Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticexporter

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticexporter

  • v0.57.2
  • Source
  • Go
  • Socket score

Version published
Created
Source

Elastic native support for OpenTelemetry

Deprecated Elastic Exporter

Status
Stabilitydeprecated
Supported pipeline typestraces, metrics
Distributionscontrib

ℹ️ This exporter has been deprecated due to Elastic APM Server supporting native OTLP ingestion since version 7.13. This means you can use an OTLP exporter to send data to Elastic APM Server, instead of the OpenTelemetry Collector Exporter for Elastic. The otlp exporter is the recommended way to integrate the OpenTelemetry Collector to Elastic.

For more details, see the Elastic documentation to integrate with OpenTelemetry.

Sample configurations

Sample configuration using an Elastic APM Secret Token

When authenticating with an Elastic APM Secret Token, define an Authorization: "Bearer xxx" header on the OTLP exporter:

...
exporters:
  otlp/elastic:
      endpoint: "xxx.elastic-cloud.com:443"
      headers:
          Authorization: "Bearer your-apm-secret-token"
service:
  pipelines:
    metrics:
      receivers:
        - otlp
      processors:
        - batch
      exporters:
        - otlp/elastic
    traces:
      receivers:
        - otlp
      processors:
        - batch
      exporters:
        - otlp/elastic

Sample configuration using an Elastic API Key

When authenticating with an Elastic API Key, define an Authorization: "ApiKey xxx" header on the OTLP exporter:

exporters:
  otlp/elastic:
      endpoint: "xxx.elastic-cloud.com:443"
      headers:
          Authorization: "ApiKey your-api-key"
...

Sample configuration for an insecure setup disabling TLS and authentication

exporters:
  otlp/elastic:
      endpoint: "localhost:8200"
      tls:
        insecure: true

Migration

ℹ️ The native support of OpenTelemetry by Elastic doesn't remove the architectural benefits of using the OpenTelemetry Collector in observability architectures. The OpenTelemetry Collector continues to add high availability, scalability, retries, live reconfiguration (like with sampling), data enrichment, ingestion of various protocols such as Jaeger or Zipkin, etc.

To migrate from the legacy OpenTelemetry Collector exporter for Elastic to the native support of OpenTelemetry in Elastic, replace the OpenTelemetry Collector's elastic exporter with an otlp exporter.

Sample migration:

...
exporters:

  ## REMOVE THE DEFINITION OF THE `ELASTIC` EXPORTER
  # elastic:
  #      apm_server_url: "https://elasticapm.example.com"
  #      secret_token: "hunter2"

  ## INTRODUCE THE DEFINITION OF AN `OTLP` EXPORTER (SAME ELASTIC HOST, SAME AUTHENTICATION TOKEN OR KEY, DON'T FORGET TO SPECIFY THE LISTEN PORT)
  otlp/elastic:
      endpoint: "xxx.elastic-cloud.com:443"
      headers:
          Authorization: "Bearer hunter2"
service:
  pipelines:
    metrics:
      receivers:
        - otlp
      processors:
        - batch
      exporters:
      
        ## REMOVE THE `ELASTIC` EXPORTER
        # - elastic
        
        ## ADD THE `OTLP` EXPORTER
        - otlp/elastic
    traces:
      receivers:
        - otlp
      processors:
        - batch
      exporters:
      
        ## REMOVE THE `ELASTIC` EXPORTER
        # - elastic
        
        ## ADD THE `OTLP` EXPORTER
        - otlp/elastic

Legacy OpenTelemetry Collector Exporter for Elastic

This exporter supports sending OpenTelemetry data to Elastic Observability.

Complete documentation is available on Elastic.co.

Configuration options

  • apm_server_url (required): Elastic APM Server URL.
  • api_key (optional): credential for API Key authorization, if enabled in Elastic APM Server.
  • secret_token (optional): credential for Secret Token authorization, if enabled in Elastic APM Server.
  • tls:
    • ca_file (optional): root Certificate Authority (CA) certificate, for verifying the server's identity, if TLS is enabled.
    • cert_file (optional): client TLS certificate.
    • key_file (optional): client TLS key.
    • insecure (optional): disable verification of the server's identity, if TLS is enabled.

Example

exporters:
    elastic:
        apm_server_url: "https://elasticapm.example.com"
        secret_token: "hunter2"

FAQs

Package last updated on 04 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc