Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(telemetry): add ability to set span attributes on connector span #6125

Merged
merged 21 commits into from
Oct 30, 2024

Conversation

bnjjj
Copy link
Contributor

@bnjjj bnjjj commented Oct 7, 2024

Give the ability to use custom telemetry with spans for connectors.


Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Tests added and passing3
    • Unit Tests
    • Integration Tests
    • Manual Tests

Exceptions

Note any exceptions here

Notes

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Oct 7, 2024

✅ Docs Preview Ready

No new or changed pages found.

@@ -124,6 +124,9 @@ impl tower::Service<ConnectRequest> for ConnectorService {
"apollo.connector.source.detail" = tracing::field::Empty,
"apollo_private.sent_time_offset" = fetch_time_offset,
);
// TODO: I think we should get rid of these attributes by default and only add it from custom telemetry. We just need to double check it's not required for Studio.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @timbotnik I need your knowledge here

Base automatically changed from pubmodmatt/connectors/instruments to next October 15, 2024 13:10
@bnjjj bnjjj marked this pull request as ready for review October 29, 2024 15:32
@bnjjj bnjjj requested review from nicholascioli and a team as code owners October 29, 2024 15:32
@bnjjj bnjjj requested review from a team as code owners October 29, 2024 15:32
@bnjjj bnjjj requested review from BrynCooke and pubmodmatt October 29, 2024 15:32
Copy link
Contributor

@pubmodmatt pubmodmatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good! Just a couple minor comments. It enables some nice things:

telemetry:
  instrumentation:
    spans:
      connector:
        attributes:
          connector.url.template: true
          connector.http.method: true
          "rate_limit":
            connector_http_response_header: "x-ratelimit-remaining"

Signed-off-by: Benjamin <[email protected]>
Signed-off-by: Benjamin <[email protected]>
@bnjjj bnjjj requested a review from pubmodmatt October 30, 2024 14:15
@bnjjj bnjjj merged commit 11eacb4 into next Oct 30, 2024
11 of 12 checks passed
@bnjjj bnjjj deleted the bnjjj/connectors/spans branch October 30, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants