Offloading analytics data to Instana exporter
Configure the DataPower Interact Gateway Collector to export telemetry data (traces, metrics, and logs) to Instana for application performance monitoring and observability.
Before you begin
Make sure
- you have an Instana account (SaaS or self-hosted).
- you have a valid Instana agent key.
- you have the Instana ingestion endpoint URL.
About this task
The Instana exporter sends traces, metrics, and logs from the OpenTelemetry Collector to Instana for comprehensive application performance monitoring and observability.
Procedure
-
Identify the namespace where the collector is deployed.
kubectl get nsSample output:
NAME STATUS AGE default Active 5h6m fyre-ci-293280 Active 5h2mNote: Lists all namespaces and their deployments, including the DataPower Interact Gateway. In this example,fyre-ci-293280is the namespace in which the DataPower Interact Gateway is deployed. -
Create a Kubernetes secret containing the Instana configuration.
kubectl create secret generic instana-credentials \ --from-literal=INSTANA_ENDPOINT='https://ingress-red-saas.instana.io' \ --from-literal=INSTANA_AGENT_KEY='your-instana-agent-key' \ -n <namespace>Important: Replacehttps://ingress-red-saas.instana.iowith your Instana SaaS or self-hosted ingestion endpoint, andyour-instana-agent-keywith your actual Instana agent key.Output:
secret/instana-credentials created -
Verify that the secret was created successfully.
kubectl get secret instana-credentials -n <namespace> -
Identify the collector deployment.
kubectl get deployment -n <namespace> | grep collectorSample output:
idig-nanogw-nanogw-analytics-collector 1/1 1 1 5h -
Edit the collector deployment to inject the secret as environment variables.
kubectl edit deployment <deployment_name> -n <namespace>-
Locate the
containerssection for theanalytics-collectorcontainer. -
Add the following
envFromsection under the container definition:envFrom: - secretRef: name: instana-credentials -
Save and exit the editor.
Sample deployment configuration:
apiVersion: apps/v1 kind: Deployment metadata: name: idig-nanogw-nanogw-analytics-collector namespace: <namespace> spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: nanogw-analytics-collector template: metadata: labels: app.kubernetes.io/name: nanogw-analytics-collector spec: containers: - name: analytics-collector image: your-image:tag envFrom: - secretRef: name: instana-credentials
-
Locate the
-
Identify the collector ConfigMap.
kubectl get configmap -n <namespace> | grep collectorSample output:
idig-nanogw-collector-config 1 5h11m -
Edit the collector ConfigMap to add the Instana exporter configuration.
kubectl edit configmap <configmap_name> -n <namespace>-
Add the following exporter configuration under the
exporterssection:exporters: otlphttp/instana: endpoint: '${INSTANA_ENDPOINT}' headers: x-instana-key: '${INSTANA_AGENT_KEY}' tls: insecure: false -
Update the service pipelines to include the Instana exporter:
service: pipelines: traces/instana: receivers: [otlp] processors: [batch/apic] exporters: [otlphttp/instana] logs/instana: receivers: [otlp] processors: [batch/apic] exporters: [otlphttp/instana] metrics/instana: receivers: [otlp] processors: [batch/apic] exporters: [otlphttp/instana] -
Save the ConfigMap.
Sample ConfigMap structure:
apiVersion: v1 kind: ConfigMap metadata: name: idig-nanogw-collector-config namespace: <namespace> data: config.yaml: | receivers: ... processors: batch/apic: ... exporters: otlphttp/instana: endpoint: '${INSTANA_ENDPOINT}' headers: x-instana-key: '${INSTANA_AGENT_KEY}' tls: insecure: false service: pipelines: traces/instana: receivers: [otlp] processors: [batch/apic] exporters: [otlphttp/instana] logs/instana: receivers: [otlp] processors: [batch/apic] exporters: [otlphttp/instana] metrics/instana: receivers: [otlp] processors: [batch/apic] exporters: [otlphttp/instana]
-
Add the following exporter configuration under the
-
Restart the collector deployment to apply the changes.
kubectl rollout restart deployment <deployment_name> -n <namespace>Output:
deployment.apps/idig-nanogw-nanogw-analytics-collector restarted -
Verify that the collector pods restart successfully.
kubectl get pods -n <namespace> | grep collectorSample output:
idig-nanogw-nanogw-analytics-collector-7d4f8ccf45-bk468 1/1 Running 0 30sThe OpenTelemetry Collector is now configured to export telemetry data to Instana. Traces, metrics, and logs will be sent to your Instana instance for application performance monitoring and observability.