# Coralogix Exporter | Status | | | ------------- |-----------| | Stability | [alpha]: profiles | | | [beta]: traces, metrics, logs | | Distributions | [contrib] | | Warnings | [Authentication issues in v0.127.0](#warnings) | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fcoralogix%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fcoralogix) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fcoralogix%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fcoralogix) | | Code coverage | [![codecov](https://codecov.io/github/open-telemetry/opentelemetry-collector-contrib/graph/main/badge.svg?component=exporter_coralogix)](https://app.codecov.io/gh/open-telemetry/opentelemetry-collector-contrib/tree/main/?components%5B0%5D=exporter_coralogix&displayType=list) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@povilasv](https://www.github.com/povilasv), [@iblancasa](https://www.github.com/iblancasa), [@douglascamata](https://www.github.com/douglascamata) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#alpha [beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib The Coralogix exporter sends traces, metrics and logs to [Coralogix](https://coralogix.com/). > Please review the Collector's [security > documentation](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md), > which contains recommendations on securing sensitive information such as the > API key required by this exporter. ## Configuration Example configuration: ```yaml exporters: coralogix: # The Coralogix domain domain: "coralogix.com" # Your Coralogix private key is sensitive private_key: "xxx" # (Optional) Protocol to use for communication: "grpc" (default) or "http" protocol: "grpc" # (Optional) Ordered list of Resource attributes that are used for Coralogix # AppName and SubSystem values. The first non-empty Resource attribute is used. # Example: application_name_attributes: ["k8s.namespace.name", "service.namespace"] # Example: subsystem_name_attributes: ["k8s.deployment.name", "k8s.daemonset.name", "service.name"] application_name_attributes: - "service.namespace" subsystem_name_attributes: - "service.name" # Traces, Metrics and Logs emitted by this OpenTelemetry exporter # are tagged in Coralogix with the default application and subsystem constants. application_name: "MyBusinessEnvironment" subsystem_name: "MyBusinessSystem" # (Optional) Configure the sending queue for batching capabilities sending_queue: sizer: bytes batch: min_size: 4194304 max_size: 8388608 # (Optional) Timeout is the timeout for every attempt to send data to the backend. timeout: 30s # (Optional) Use AWS PrivateLink for private connectivity. When true, data is sent to # ingress.private.. See "Coralogix's Domain" section below for details. # private_link: true ``` ### Transport Protocol The Coralogix exporter supports two transport protocols: - **gRPC** (default): Uses gRPC for efficient binary communication - **HTTP**: Uses HTTP with protobuf encoding, useful for proxy support or environments where gRPC is restricted To use HTTP protocol: ```yaml exporters: coralogix: protocol: "http" domain: "coralogix.com" ``` #### Using HTTP Protocol with Proxy When using HTTP protocol, you can configure proxy settings: ```yaml exporters: coralogix: protocol: "http" domain: "coralogix.com" private_key: "xxx" application_name: "MyApp" subsystem_name: "MySubsystem" domain_settings: proxy_url: "http://proxy.example.com:8080" timeout: 30s ``` **Notes**: - Proxy support (`proxy_url`) is only available when using the HTTP protocol. gRPC protocol does not support this setting. - Signal-specific settings (logs, traces, metrics) take precedence over `domain_settings`. - **The profiles signal is not supported when using HTTP protocol**. Use gRPC protocol (default) if you need to send profiles data. ``` ### Compression By default, the Coralogix exporter uses gzip compression. Alternatively, you can use zstd compression, for example: ```yaml exporters: coralogix: domain_settings: compression: "zstd" ``` ### v0.76.0 Coralogix Domain Since v0.76.0 you can specify Coralogix domain in the configuration file instead of specifying different endpoints for traces, metrics and logs. For example, the configuration below, can be replaced with domain field: Old configuration: ```yaml exporters: coralogix: traces: endpoint: "ingress.coralogix.com:443" metrics: endpoint: "ingress.coralogix.com:443" logs: endpoint: "ingress.coralogix.com:443" ``` New configuration with domain field: ```yaml exporters: coralogix: domain: "coralogix.com" ``` ### Coralogix's Domain Depending on your region and, you might need to use a different domain. For an up-to-date list of domains, please refer to [the official Coralogix's Domain documentation](https://coralogix.com/docs/user-guides/account-management/account-settings/coralogix-domain/#domains). Additionally, Coralogix supports AWS PrivateLink, which provides private connectivity between virtual private clouds (VPCs), supported AWS services, and your on-premises networks without exposing your traffic to the public internet. For an up-to-date list of AWS PrivateLink domains, please refer to [Coralogix's official AWS PrivateLink documentation](https://coralogix.com/docs/integrations/aws/aws-privatelink/aws-privatelink/#privatelink-endpoints). To automatically use the PrivateLink endpoint that corresponds to the configured domain, you can set the `private_link` configuration field to `true`. For example: ```yaml exporters: coralogix: domain: "eu2.coralogix.com" private_link: true ``` ### Application and SubSystem attributes v0.62.0 release of OpenTelemetry Collector allows you to map Application name and Subsystem name to Resource attributes. You need to set `application_name_attributes` and `subsystem_name_attributes` fields with a list of potential Resource attributes for the AppName and Subsystem values. The first not-empty Resource attribute is going to be used. If multiple resource attributes are available, **the order of the attributes in the list determines their priority.** ### Kubernetes attributes When using OpenTelemetry Collector with [k8sattribute](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor) processor, you can use attributes coming from Kubernetes, such as `k8s.namespace.name` or `k8s.deployment.name`. The following example shows recommended list of attributes: ```yaml exporters: coralogix: domain: "coralogix.com" application_name_attributes: - "k8s.namespace.name" - "service.namespace" subsystem_name_attributes: - "k8s.deployment.name" - "k8s.statefulset.name" - "k8s.daemonset.name" - "k8s.cronjob.name" - "service.name" ``` ### Host Attributes OpenTelemetry Collector [Resource Detection](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor) processor can discover Host Resource attributes, such as `host.name` and provide Resource attributes using environment variables, which can be used for setting AppName and SubSystem fields in Coralogix. Example: ```yaml processors: resource_detection/system: detectors: ["system", "env"] system: hostname_sources: ["os"] ``` And setting environment variable such as: ``` OTEL_RESOURCE_ATTRIBUTES="env=production" ``` You can configure Coralogix Exporter: ```yaml exporters: coralogix: domain: "coralogix.com" application_name_attributes: - "env" subsystem_name_attributes: - "host.name" ``` ### EC2 Attributes OpenTelemetry Collector [Resource Detection](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor) processor can discover EC2 Resource attributes, such as EC2 tags as resource attributes. Example: ```yaml processors: resource_detection/ec2: detectors: ["ec2"] ec2: # A list of regex's to match tag keys to add as resource attributes can be specified tags: - ^ec2.tag.name$ - ^ec2.tag.subsystem$ ``` **_NOTE:_** In order to fetch EC2 tags, the IAM role assigned to the EC2 instance must have a policy that includes the `ec2:DescribeTags` permission. ```json { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": "ec2:DescribeTags", "Resource": "*" } ] } ``` You can configure Coralogix Exporter: ```yaml exporters: coralogix: domain: "coralogix.com" application_name_attributes: - "ec2.tag.name" subsystem_name_attributes: - "ec2.tag.subsystem" ``` ### Custom Attributes You can combine and create custom Resource attributes using [transform](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor) processor. For example: ```yaml processors: transform: error_mode: ignore log_statements: - context: resource statements: - set(attributes["applicationName"], Concat(["development-environment", attributes["k8s.namespace.name"]], "-")) ``` Then you can use the custom Resource attribute in Coralogix exporter: ```yaml exporters: coralogix: domain: "coralogix.com" application_name_attributes: - "applicationName" subsystem_name_attributes: - "host.name" ``` ### Exporting to multiple teams based on attributes You can export the signals based on your business logic (attributes) to different Coralogix teams. To achieve this, you'll need to use the [`filter`](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/filterprocessor/README.md) processor and setup one pipeline per team. You can setup your `filter` processors as following (example with metrics): ```yaml processors: filter/teamA: metrics: datapoint: - 'attributes["your_label"] != "teamA"' filter/teamB: metrics: datapoint: - 'attributes["your_label"] != "teamB"' ``` This configuration ensures separate processor per each team. Any data points without an attribute for a particular team will be dropped from exporting. Secondly, set up an individual exporter per each team: ```yaml exporters: coralogix/teamA: metrics: endpoint: "otel-metrics.coralogix.com:443" private_key: application_name: "MyBusinessEnvironment" subsystem_name: "MyBusinessSystem" coralogix/teamB: metrics: endpoint: "otel-metrics.coralogix.com:443" private_key: application_name: "MyBusinessEnvironment" subsystem_name: "MyBusinessSystem" ``` Finally, join each processor and exporter (and any other components you wish) in the pipelines. Here is an example with a Prometheus receiver: ```yaml service: pipelines: metrics/1: receivers: [prometheus] processors: [filter/teamA] exporters: [coralogix/teamA] metrics/2: receivers: [prometheus] processors: [filter/teamB] exporters: [coralogix/teamB] ``` ### Custom application and subsystem name You can pass custom application and subsystem name via the following resource attributes: - `cx.subsystem.name` - `cx.application.name` For example: ```yaml receivers: file_log/nginx: include: - '/tmp/tmp.log' include_file_path: true include_file_name: false start_at: end resource: cx.subsystem.name: nginx file_log/access-log: include: - '/tmp/access.log' include_file_path: true include_file_name: false resource: cx.subsystem.name: access-log exporters: coralogix: domain: 'coralogix.com' private_key: "XXX" application_name: 'app_name' timeout: 30s service: pipelines: logs: receivers: [file_log/nginx, file_log/access-log] exporters: [coralogix] ``` ## Warnings ### Authentication issues in v0.127.0 Version 0.127.0 introduced a regression in the Coralogix exporter. As a consequence, it requires an updated authentication configuration to ensure proper telemetry data transmission to Coralogix. If you're using this version, please modify your configuration to include the authentication headers as shown below: ```yaml coralogix: traces: headers: "Authorization": "Bearer ${env:CORALOGIX_PRIVATE_KEY}" metrics: headers: "Authorization": "Bearer ${env:CORALOGIX_PRIVATE_KEY}" logs: headers: "Authorization": "Bearer ${env:CORALOGIX_PRIVATE_KEY}" ``` This configuration ensures proper authentication with the Coralogix backend. Prior versions (v0.126.0 and earlier) and subsequent versions (v0.128.0 and later) are not affected by this authentication issue. ### Need help? Our world-class customer success team is available 24/7 to walk you through the setup for this exporter and answer any questions that may come up. Feel free to reach out to us **via our in-app chat** or by sending us an email to [support@coralogix.com](mailto:support@coralogix.com).