Skip to content

ClickHouse - ScopeAttributes aren't stored #27425

Closed as not planned
Closed as not planned
@StarpTech

Description

Component(s)

No response

What happened?

Description

Hi, I found out that scope attributes attached to a Meter aren't forwarded to ClickHouse. It seems, they aren't passed here https://github.com/wundergraph/opentelemetry-collector-contrib/blob/dbb685a63b0527c1255663e11daba27ca94e60dc/exporter/clickhouseexporter/internal/histogram_metrics.go#L178

Steps to Reproduce

Create a meter with the following option and measure anything.

routerMeter := h.meterProvider.Meter(cosmoRouterMeterName,
	metric.WithInstrumentationVersion("0.0.1"),
	metric.WithInstrumentationAttributes(attribute.String("router.version", "0.0.1")),
)

Expected Result

I should see attributes in the ScopeAttributes column.

Actual Result

No attributes.

Collector version

0.84.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04") Pop!_OS 22.04 LTS x86_64
Compiler(if manually compiled): (e.g., "go 14.2") go version go1.20.4 linux/amd64

OpenTelemetry Collector configuration

receivers:
  otlp:
    protocols:
      http:
        endpoint: '0.0.0.0:4318'

exporters:
  clickhouse:
    endpoint: ${CLICKHOUSE_ENDPOINT}
    timeout: 10s
    database: cosmo
    traces_table_name: otel_traces
    metrics_table_name: otel_metrics
    ttl_days: 30
    sending_queue:
      queue_size: 5000
    retry_on_failure:
      enabled: true
      initial_interval: 10s
      max_interval: 30s
      max_elapsed_time: 300s

service:
  pipelines:
    metrics:
      receivers: [otlp]
      exporters: [clickhouse]
    traces:
      receivers: [otlp]
      exporters: [clickhouse]

Log output

No response

Additional context

No response

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions