Skip to content

Enbaling ServiceGraph metrics thows an error #2076

Description

@mrmartan

I am looking at https://github.com/grafana/k8s-monitoring-helm/blob/main/charts/k8s-monitoring/docs/destinations/otlp.md?plain=1

Having a this snippet in values:

destinations:
  - name: gc-otlp-endpoint
    metrics:
      enabled: true
    logs:
      enabled: true
    traces:
      enabled: true
    processors:
      serviceGraphMetrics:
        enabled: true
      tailSampling:
        enabled: true

throws an error:

Error: UPGRADE FAILED: template: k8s-monitoring/templates/alloy-servicegraph.yaml:24:34: executing "k8s-monitoring/templates/alloy-servicegraph.yaml" at <include "destinations.otlp.alloy.exporter.target" $dest>: error calling include: template: k8s-monitoring/templates/destinations/_destination_otlp.tpl:368:18: executing "destinations.otlp.alloy.exporter.target" at <.processors.batch.enabled>: nil pointer evaluating interface {}.enabled

The docs say the batch processor is enabled by default but changing the above to:

destinations:
  - name: gc-otlp-endpoint
    metrics:
      enabled: true
    logs:
      enabled: true
    traces:
      enabled: true
    processors:
      batch:
        enabled: true
      serviceGraphMetrics:
        enabled: true
      tailSampling:
        enabled: true

makes the update go though. (Take note of the processors.batch.enabled = true)

I am using the latest version of the chart. My goal is to have span matrics, service graph and tail sampling all enabled in Alloy so that I can have Grafana Cloud enabled with

Image

After the change I have started to get the traces_service_graph_ metrics and the service map in APM.

Image Image

I am still not getting the Outbound/Inbound shown for individual services.

Image

I am using the OTEL Demo app with the Bring your own backend option:

opentelemetry-collector:
  config:
    exporters:
      otlphttp/grafana:
        endpoint: http://grafana-k8s-monitoring-alloy-receiver.grafana-cloud.svc.cluster.local:4318

    service:
      pipelines:
        traces:
          exporters: [spanmetrics, otlphttp/grafana]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions