Configure sampling, export behavior, operation naming, attributes, and metric categorization for instrumented applications.

Cluster-level WaveCluster resources normally belong in the AutoI release namespace. Namespace and workload policies belong in the workload namespace. Inspect existing objects before editing because AutoI can create defaults.

Configure sampling and export

Enable autoInstrumentation.headSamplingEnabled to make sampling decisions when a span starts.

Sampling ratios use values from 0 to 1:

  • 1 means 100 percent.
  • 0.5 means 50 percent.

Reducing sampling can lower telemetry volume but can also reduce troubleshooting coverage.

Cluster export policy

Use a cluster export policy for shared settings:

apiVersion: autoi.config.opsramp.com/v1
kind: WaveClusterAutoInstrumentationExportPolicy
metadata:
  name: cluster-telemetry-export-policy
  namespace: opsramp-autoi
spec:
  span:
    samplingRatio: 1
  spanMetrics:
    exportIntervalSeconds: 60

Namespace export policy

Use a namespace export policy to override sampling or add histogram buckets:

apiVersion: autoi.config.opsramp.com/v1
kind: WaveAutoInstrumentationExportPolicy
metadata:
  name: example-export-policy
  namespace: team-a
spec:
  span:
    samplingRatio: 0.5
  spanMetrics:
    additionalHistogramBucketsMilliSeconds: [500, 2000]

Preserve existing exporter fields when updating a policy. Use perServiceExportPolicies for workload-specific overrides and inspect the installed schema:

kubectl explain wai-exppol.spec --recursive

Per-service export policy

Use perServiceExportPolicies to override export settings for a specific workload. Sampling ratios must be between 0 and 1; for example, 0.18 represents 18 percent.

apiVersion: autoi.config.opsramp.com/v1
kind: WaveAutoInstrumentationExportPolicy
metadata:
  name: namespace-export-policy
  namespace: qa-bank-app
spec:
  perServiceExportPolicies:
    - workloadKind: Deployment
      workloadName: bank-jecj-bank-api
      span:
        samplingRatio: 0.18
      spanMetric:
        additionalHistogramBucketsMilliSeconds:
          - 250
          - 1000

Application service-graph metrics are controlled separately by autoInstrumentation.enableServiceGraphMetrics.

Configure operation naming

Parameterization groups variable URLs or operation names, helping control metric cardinality. Replace example routes with patterns that match your application and verify resulting operation names before production use.

apiVersion: autoi.config.opsramp.com/v1
kind: WaveAutoInstrumentationParameterization
metadata:
  name: example-parameterization
  namespace: team-a
spec:
  parameterizeRuleSets:
    - workloadKind: Deployment
      workloadName: example-app
      parameterizeRules: ["/orders/{id}"]

Use WaveClusterAutoInstrumentationParameterization for shared cluster rules.

Configure attribute filtering

Restrictive filters can remove context needed for investigation. Review privacy and cardinality requirements before filtering data.

1. Filter metric attributes

Use WaveClusterAutoInstrumentationFilterMetricAttributes to include or exclude metric and resource attributes.

apiVersion: autoi.config.opsramp.com/v1
kind: WaveClusterAutoInstrumentationFilterMetricAttributes
metadata:
  name: filter-metric-attributes-rules
  namespace: opsramp-autoi
spec:
  filterMetricAttributeRules:
    - includeMetricAttributes:
        - service.name
        - http.request.method
      excludeMetricResourceAttributes:
        - host.name

2. rop span attributes

Use WaveClusterAutoInstrumentationFilterSpanAttributes to remove selected span attributes, such as url.query.

apiVersion: autoi.config.opsramp.com/v1
kind: WaveClusterAutoInstrumentationFilterSpanAttributes
metadata:
  name: filter-span-attributes-rules
  namespace: opsramp-autoi
spec:
  filterSpanAttributes:
    - user.email
    - user.phone

Attribute-filter changes may require restarting instrumented applications before they take effect. Updating the custom resource alone does not ensure that already-running applications use the new settings.

3. Retain selected span attributes

Use WaveClusterAutoInstrumentationRetainSpanAttributes to preserve selected attributes from the drop list. Retention rules are not a substitute for a privacy review.

Categorize span metrics

Use WaveClusterAutoInstrumentationMetricCategorizeRules to assign categories based on instrumentation scope.

apiVersion: autoi.config.opsramp.com/v1
kind: WaveClusterAutoInstrumentationMetricCategorizeRules
metadata:
  name: span-metric-categorize-rules
  namespace: opsramp-autoi
spec:
  metricCategorizeRules:
    - instrumentationScope: fastmcp
      newAttributeValues:
        - name: transaction_category
          value: RPC Systems

Verify application telemetry

Generate application traffic and verify:

  • Expected traces reach OpsRamp.
  • The effective sampling rate meets troubleshooting requirements.
  • Span-derived metrics update at the configured interval.
  • Operation names are grouped as intended.
  • Required attributes remain available.