Please use Github Issues for reporting any issues, questions or enhancement requests for this module.
-
First of all, fork this repo and clone it to your local.
-
Create a new branch for your work. Following Conventional Commits for naming convention is recommended.
-
Make sure project builds and tests succeed before you make any changes -
./mvnw verify
-
Make you code changes and add appropriate unit tests to validate the change.
-
Make appropriate updates to documentation, most likely it will be applicable to src/docs/asciidoc/module-config.adoc.
-
You must format code for successful maven compilation. Execute
./mvnw spotless:apply verify
to format and run tests. -
Once you are satisfied with the change, push it to the remote repository and open a PR to avioconsulting/mule-opentelemetry-module.
src/test/docker
contains two files:
Following environment variables must be set to send traces to OpenTelemetry collector -
otel.traces.exporter=otlp
otel.exporter.otlp.endpoint=http://localhost:55681/v1
otel.exporter.otlp.traces.endpoint=http://localhost:55681/v1/traces
otel.exporter.otlp.protocol=http/protobuf
otel.metrics.exporter=none
otel.resource.attributes=deployment.environment=dev,service.name=test-api
Import applications from ./examples
directory into Anypoint Studio. Both applications have an OpenTelemetry Configuration to send traces to local docker collector.
Application 1 exposes http://localhost:8081/app1/{userId}
endpoint for invocation. App 1 calls App 2 over http to simulate distributed tracing.
Anypoint studio caches' the modules used. If you need to modify the extension and test it in imported applications, you need to bump up the version and update example projects with new version.
You may use following command to keep incrementing patch version and install locally -
mvn build-helper:parse-version versions:set -DnewVersion='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.nextIncrementalVersion}' versions:commit && mvn spotless:apply install