Observing costs of your AI application

You can find how costs are calculated, displayed, and managed in Instana's generative AI observability dashboards.

How cost is calculated

Instana generative AI Observability tracks and displays costs that are associated with large language model (LLM) usage based on token consumption. Understanding how these costs are calculated helps you:

  • Monitor and optimize AI spending
  • Make informed decisions about model selection
  • Budget accurately for AI operations
  • Identify cost anomalies and inefficiencies

Token-based pricing model

Generative AI costs are calculated based on token consumption by using the following formula:

Total Cost = (Input Tokens × Input Token Price) + (Output Tokens × Output Token Price)

Where:

  • Input Tokens: The number of tokens in the prompt sent to the LLM
  • Output Tokens: The number of tokens in the response generated by the LLM
  • Input Token Price: The cost per input token per 1 million tokens
  • Output Token Price: The cost per output token per 1 million tokens

Per-model cost calculation

Each LLM model has its own pricing structure. Costs are calculated individually for each model based on:

  • Model-specific pricing: The token prices differ between models. For example, GPT-4 is more expensive than GPT-3.5. 2.
  • Token type differentiation: Input tokens and output tokens are priced differently.
  • Real-time aggregation: Costs are aggregated across all requests to a specific model.
  • Hourly/Daily Cost: Costs aggregated by time buckets for trend analysis
  • Cost by Application: Costs that are grouped by application or service making LLM calls

Configuring model pricing

You can configure the pricing model.

Accessing the pricing configuration

To configure or update the model pricing:

  1. Go to GenAI observability on the Instana UI.
  2. Click the Pricing configuration tab.

Predefined pricing

Instana provides a predefined list of popular LLM models with current market pricing, including:

  • OpenAI models (GPT-4o-mini, GPT-5.1, and so on)
  • Anthropic models (Claude 3 Opus, Claude 3 Sonnet, and so on)
  • IBM watsonx.ai models
  • Other supported model providers
The predefined pricing is regularly updated to reflect current market rates.
Figure 1. Generative LLM-pricing-configuration
Generative LLM-pricing-configuration

Adding custom model pricing

To add pricing for a new model that is not in the predefined list:

  1. On the "Pricing configuration" page, click Add model pricing.
  2. Enter the following information:
    • Model Name: The exact name as it appears in traces (for example, "gpt-4-turbo-preview").
    • Model Provider: The platform or provider (for example, openai, anthropic, ibm).
    • Platform name: To set platform-specific pricing, check Set platform-specific pricing and enter the Platform name (for example, anthropic, bedrock, langchain).
    • Input Token Price: Cost per 1 million input token in USD.
    • Output Token Price: Cost per 1 million output token in USD.
  3. Click Save to apply the configuration.
Figure 2. Add pricing for a model
Add pricing for a model

Overriding existing model pricing

To override the predefined pricing for a model:

  1. In the Pricing configuration tab, locate the model that you want to update.
  2. Click the model name.
  3. 3. In the Token pricing section, update the values in the following fields:
    • Input price
    • Output price
  4. Click Save to apply the changes.
    Note:
    Overriding pricing does not affect historical cost data. The new pricing applies only to data collected after the change.
Figure 3. Edit model pricing
Edit model pricing

Resetting to predefined pricing

If the pricing for a model is overridden you and want to revert to the original predefined pricing, complete the following steps:

  1. In the Pricing configuration tab, locate the model with overridden pricing.
  2. Click the model name. The Edit model pricing dialog is displayed.
  3. 3. On the Reset pricing section, select. The I understand that this action cannot be undone checkbox.
  4. 4. Click the Reset to catalog pricing button.
  5. 5. Click Save.

The model pricing is reset to the original predefined values. It takes effect for all new cost calculations going forward. It does not affect historical cost data calculated with the overridden pricing.

Figure 4. Reset pricing
Reset pricing

Deleting custom model pricing

For models that you added manually (models without predefined pricing), you can delete the pricing configuration:

  1. In the Pricing configuration page, locate the custom model that you want to remove.
  2. Click the Delete icon next to the model .
  3. Confirm deletion when the dialog is displayed.

Important considerations:

  • Only custom models (models without predefined pricing) can be deleted
  • Predefined models can only be reset to default, not deleted
  • Deleting a model's pricing causes cost metrics to stop appearing for that model
  • Historical cost data for the deleted model remains in the system
  • Other metrics (tokens, latency, traces) continue to be collected and displayed
Note:
After custom model pricing is deleted, you need to manually add the pricing configuration again if you want cost metrics to appear again for that model.

Impact of pricing updates

When pricing is updated, the following behavior occurs.

When pricing is updated

When you update model pricing in the configuration, the following changes occur.

Immediate effects:

  • New cost calculations use the updated pricing
  • Dashboard widgets reflect the new pricing for incoming data

Historical data:

  • Historical cost data is not recalculated automatically
  • Past costs remain as they were calculated at the time
  • Audit trail integrity is retained and data inconsistencies are prevented

Best practices:

  • Document pricing changes with effective dates
  • Consider exporting cost reports before major pricing updates
  • Communicate pricing changes to the stakeholders who monitor costs

When pricing is not configured

If pricing is not configured for a specific model, the following behavior applies:

Cost metrics:

  • Cost metrics are not displayed for that model.
  • Dashboard widgets that show cost exclude the unconfigured model
  • Total cost calculations exclude the requests to that model

Other metrics remain available:

  • Token counts (input and output) are still tracked and displayed
  • Request latency and performance metrics continue to work
  • Trace data and logs are unaffected

Impact on dashboards:

  • Summary cost widgets might show incomplete totals
  • Per-model cost breakdowns omit unconfigured models
  • Cost trend charts might have gaps or lower values than expected

Troubleshooting pricing issues

You may encounter any of the following issues.

For common issues such as cost metrics not appearing, see Troubleshooting.

Incorrect cost calculations

Problem: Displayed costs don't match expected values.

Solution: To troubleshoot this issue, try the following steps:

  1. Verify that the configured pricing matches the provider's current rates
  2. Check the pricing unit (per 1000 tokens versus per 1 million tokens)
  3. Review token counts to validate the calculation

Missing models in configuration

Problem: A model in use is not in the configuration list.

Solution: To troubleshoot this issue, try the following steps:

  1. Add the model manually using the "Add model pricing" function
  2. Ensure that the model name matches exactly as it appears in traces
  3. Obtain pricing information from the model provider
  4. Save and verify the configuration

Historical cost discrepancies

Problem: Historical costs that are changed after a pricing update.

Solution: To troubleshoot this issue, try the following steps:

  • Historical costs must not change; if they change, contact IBM support
  • Export cost reports regularly to maintain independent records
  • Use the audit log to track configuration changes

Questions or issues related to pricing

For questions or issues that are related to pricing configuration: