open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.92k stars 2.28k forks source link

Send httpcheck to elastic #34185

Open Breee opened 2 months ago

Breee commented 2 months ago

Component(s)

cmd/otelcontribcol

What happened?

Description

I'm trying to get httpcheck metrics into elastic

Expected Result

Metrics in Elastic APM

Actual Result

No metrics

Any idea why?

Collector version

0.103.0

Environment information

Environment

docker

OpenTelemetry Collector configuration

receivers: 
  httpcheck:
    targets:
      - endpoint: https://example.com
        method: GET
    collection_interval: 60s

processors: 
  memory_limiter:
    check_interval: 1s
    limit_mib: 2000
  batch:

exporters:
  debug:
    verbosity: detailed 
  otlp/elastic: 
    # Elastic APM server https endpoint without the "https://" prefix
    endpoint: "${env:ELASTIC_APM_SERVER_ENDPOINT}"  
    headers:
      # Elastic APM Server secret token
      Authorization: "Bearer ${env:ELASTIC_APM_SECRET_TOKEN}"  

service:
  pipelines:
    metrics:
      receivers: [httpcheck]
      exporters: [debug, otlp/elastic]

Log output

No response

Additional context

No response

crobert-1 commented 2 months ago

Hello @Breee, thanks for filing this issue. Just to confirm, are you seeing the metrics coming through using the debug exporter?

Breee commented 2 months ago

Yes

github-actions[bot] commented 2 months ago

Pinging code owners for exporter/elasticsearch: @JaredTan95 @ycombinator @carsonip. See Adding Labels via Comments if you do not have permissions to add labels yourself.

carsonip commented 2 months ago

If I understand correctly, otlp/elastic does not use elasticsearch exporter. This is about sending otlp to Elastic APM server. While I can try to help with this, I don't think the exporter/elasticsearch label is applicable in this case.

@Breee