corentinmusard / otel-cicd-action

Open Telemetry CI/CD Action
MIT License
12 stars 3 forks source link

[Question] Adding attributes to spans #16

Open brett-anderson opened 4 months ago

brett-anderson commented 4 months ago

Hello! We are currently using https://github.com/honeycombio/gha-buildevents to trace our Github Actions, but are finding a few shortcomings:

Due to these issues we are exploring alternatives, and found this library.

Sometimes we need to set custom attributes on the root span, depending on some conditions. Is there any suggestions on how to do this with this action? One example would be adding the labels from a pull request.

Thank you for maintaining! As an aside I found a small typo while reading through the examples, here is a PR to fix.

brett-anderson commented 4 months ago

@corentinmusard I've written a PR here to introduce PR labels to traces, let me know if this is close to an approach you would consider implementing.

corentinmusard commented 4 months ago

Thanks a lot for the PR. Really appreciate the tests, I'm aware that the test setup is far from ideal.

The only comment I have is to keep the labels as an array instead of a comma separated string (I pushed that to the PR).

brett-anderson commented 4 months ago

Thanks a lot for the PR. Really appreciate the tests, I'm aware that the test setup is far from ideal.

The only comment I have is to keep the labels as an array instead of a comma separated string (I pushed that to the PR).

Works for me, thank you!