Immutable solution version
OpenTelemetry Export to Elastic Search without Elastic APM
Complete solution
After trying this for some time, I've finally made it to work with the latest version of opentelemetry-collector-contrib (0.60.0 at the time of this writting).
After trying this for some time, I've finally made it to work with the latest version of opentelemetry-collector-contrib (0.60.0 at the time of this writting). First I've created a multi-node cluster with Docker Compose using the steps here https://www.elastic.co/guide/en/elasticsearch/reference/8.4/docker.html#docker-compose-file . I also had to follow the instructions to set the vm.maxmapcount to at least 262144. Then, using the same net, I started an opentelemetry-collector-contrib docker image using a command like: docker run --net certsdefault --name opentelemetry-collector -v C:\docker\elastic\otel-collector-config.mount the host path yaml at container path /etc/otelcol-contrib/config.yaml -p 4317:4317 -p 4318:4318 otel/opentelemetry-collector-contrib:0.60.0 The configuration file is very simple: receivers: otlp: protocols: grpc: http: exporters: logging: loglevel: debug elasticsearch/trace: endpoints: [https://es01:9200] user: elastic password - apikey - tls: insecureskipverify: true service: pipelines: traces: receivers: [otlp] exporters: [elasticsearch/trace] Finally, I've just configured my application to use the OtlpExporter: .AddOtlpExporter(configure => { configure.Protocol = OpenTelemetry.Exporter.OtlpExportProtocol.Grpc; }) Doing these steps, I can see my traces in Kibana. Now it would be nice to have some template to display a single trace with all the spans.
Context: I'd like to export trace/metrics data to Elastic Search using OpenTelemetry, but I'd prefer to avoid Elastic APM. Is it possible? The opentelemetry contrib repo apparently suggests it is possible, however, I did not find anything on elastic.co documentation. By the way, openapm.io implies see here , OpenTelemetry can export to elastic beats (which is extremely desirable), but again, I did not find anything in Elastic.co docs.
Evidence
Source: I'd like to export trace/metrics data to Elastic Search using OpenTelemetry, but I'd prefer to avoid Elastic APM. Is it possible? The opentelemetry contrib repo apparently suggests it is possible, however, I did not find anything on elastic.co documentation. By the way, openapm.io implies see here , OpenTelemetry can export to elastic beats (which is extremely desirable), but again, I did not find anything in Elastic.co docs.
Verified resolution: After trying this for some time, I've finally made it to work with the latest version of opentelemetry-collector-contrib (0.60.0 at the time of this writting). First I've created a multi-node cluster with Docker Compose using the steps here https://www.elastic.co/guide/en/elasticsearch/reference/8.4/docker.html#docker-compose-file . I also had to follow the instructions to set the vm.maxmapcount to at least 262144. Then, using the same net, I started an opentelemetry-collector-contrib docker image using a command like: docker run --net certsdefault --name opentelemetry-collector -v C:\docker\elastic\otel-collector-config.mount the host path yaml at container path /etc/otelcol-contrib/config.yaml -p 4317:4317 -p 4318:4318 otel/opentelemetry-collector-contrib:0.60.0 The configuration file is very simple: receivers: otlp: protocols: grpc: http: exporters: logging: loglevel: debug elasticsearch/trace: endpoints: [https://es01:9200] user: elastic password - apikey - tls: insecureskipverify: true service: pipelines: traces: receivers: [otlp] exporters: [elasticsearch/trace] Finally, I've just configured my application to use the OtlpExporter: .AddOtlpExporter(configure => { configure.Protocol = OpenTelemetry.Exporter.OtlpExportProtocol.Grpc; }) Doing these steps, I can see my traces in Kibana. Now it would be nice to have some template to display a single trace with all the spans.
Source URL: https://stackoverflow.com/questions/70909613/opentelemetry-export-to-elastic-search-without-elastic-apm
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_9S2IdapAs8P9NOloBsg0Dw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">OpenTelemetry Export to Elastic Search without Elastic APM <span>— Vectle</span></a>