corentinmusard / otel-cicd-action

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

No pull request trace span attributes recorded when triggering on "workflow_run" #14

Open seh opened 4 months ago

seh commented 4 months ago

The project's documentation recommends triggering a workflow using this action to run upon receiving the "workflow_run" GitHub event. However, when I do so, I notice that none of my trace spans include any of the "github.pull_requests.*" trace span attributes mentioned in the documentation.

Should these attributes be available for such events? I see that the action looks for whether the workflow job references any pull requests, and I have this action recording traces for GitHub Actions workflows of mine that trigger upon "pull_request" events. Can this action not see "through" the event it receives to what happened with the job it's transcribing later?

corentinmusard commented 4 months ago

Thank you for your comment. I'll investigate this issue this week.

Did you try the 2nd method (adding it inside an existing workflow) ?

seh commented 4 months ago

Did you try the 2nd method (adding it inside an existing workflow) ?

Not with this action, but that's how I used to use the upstream fork. I figured that when I switched to use this fork, I'd also stop repeating the job definition in each of the workflows that I wanted to instrument.

seh commented 1 month ago

Should we consider the currently recommended approach to no longer be the right idea? After using it for several months, I'm dissatisfied both by all of the workflow run records posted to the repositories actions page, and by the lack of pull request-related details in resulting traces.

seh commented 1 month ago

Having changed my workflows to include this action in a final job within each workflow, I'm still finding no span attributes with names including the word "pull_request", despite what's mentioned in the documentation.

The triggering event for my workflow run is "pull_request". What might be going wrong here?

seh commented 1 month ago

I discovered that for pull requests initiated from branches within the same GitHub repository as the target branch, we do get these PR-related span attributes. It seems that either GitHub is not making these details available for PRs initiated from branches in forked repositories, or the details sit in a different place in the data this action is retrieving from the GitHub API.

seh commented 1 month ago

See the "community" discussion 25220 for coverage of this omission.

corentinmusard commented 3 weeks ago

Hey, Sorry, I don't have the bandwidth to work on this project anymore. I'm quite busy with life at the moment.