Skip to content

Axway-API-Management-Plus/opentelemetry-apim-agent

Repository files navigation

OpenTelemetry Axway APIM Integration

Axway APIM Integration with OpenTelemetry using OpenTelemetry Java SDK

API Management Version Compatibility

This artefact tested with following version:

  • V7.7 May 2024

Compile/Build

In build.gradle file, update dependencies location:

  • Set the variable apim_folder to you API-Gateway installation folder (e.g. opt/Axway/APIM/apigateway)
gradlew clean jar

Setup

Copy following jar files

Testing with Jaeger

  • Start Jaeger server
docker run --name jaeger   -e COLLECTOR_OTLP_ENABLED=true   -p 16686:16686   -p 4317:4317   -p 4318:4318   jaegertracing/all-in-one:1.49
  • Environment variables for API Gateway to send metrics to Jaeger
export OTEL_EXPORTER_OTLP_ENDPOINT=http://10.129.61.129:4317
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
export OTEL_TRACES_EXPORTER=otlp
export OTEL_SERVICE_NAME=apim-gw
export OTEL_METRICS_EXPORTER=none
  • Restart API Gateway

Testing with New Relic

  • Create a licence key
  • Environment variables for API Gateway to send metrics to New Relic
export OTEL_SERVICE_NAME=api-gw
export OTEL_EXPERIMENTAL_EXPORTER_OTLP_RETRY_ENABLED=true
export OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=BASE2_EXPONENTIAL_BUCKET_HISTOGRAM
export OTEL_EXPERIMENTAL_RESOURCE_DISABLED_KEYS=process.command_args
export OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.nr-data.net
export OTEL_EXPORTER_OTLP_HEADERS=api-key=<<license key>>
export OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT=4095
export OTEL_EXPORTER_OTLP_COMPRESSION=gzip
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta
  • Restart API Gateway

Testing with Datadog

        environment:
            - DD_API_KEY=<apikey>
            - DD_SITE=us3.datadoghq.com
  • Start OTEL collector
$docker-compose -f datadog/docker-compose.yaml start
  • Setup environment variable for api gateway
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
export OTEL_TRACES_EXPORTER=otlp
export OTEL_SERVICE_NAME=apim-gw
export OTEL_METRICS_EXPORTER=none
  • Restart API Gateway

Testing with Dynatrace

Set up your Dynatrace account and environment variables

  • Create a Dynatrace account. If you don’t have one, you can use a trial account.

  • create an access token that includes scopes for the following:

    Ingest OpenTelemetry traces (openTelemetryTrace.ingest) Ingest metrics (metrics.ingest) - Currently not used Ingest logs (logs.ingest) - currently not used For details, see Dynatrace API – Tokens and authentication in the Dynatrace documentation.

  • Update dynatrace/docker-compose.yaml with api key and dynatrace endpoint

        environment:
            - DT_API_TOKEN=<Access Token>
            - DT_ENDPOINT=https://{your-env-id}.live.dynatrace.com/api/v2/otlp
  • Start OTEL collector
$docker-compose -f dynatrace/docker-compose.yaml start
  • Setup environment variable for api gateway
export OTEL_EXPORTER_OTLP_ENDPOINT=http://loclhost:4317
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
export OTEL_TRACES_EXPORTER=otlp
export OTEL_SERVICE_NAME=apim-gw
export OTEL_METRICS_EXPORTER=none
  • Restart API Gateway

Requests captured in OpenTelemetry

  • Policy exposed as Endpoint.
  • API manager Traffic
  • API Repository defined in Policystudio
  • API Manager UI traffic

Requests not captured in OpenTelemetry

  • API Manager REST API call.
  • Servlet defined in Policystudio.

Contributing

Please read Contributing.md for details on our code of conduct, and the process for submitting pull requests to us.

Team

alt text Axway Team

License

Apache License 2.0

About

OpenTelemetry Axway APIM Integration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages