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

fix(python): x-doc-url support wip #916

Merged
merged 17 commits into from
Sep 20, 2023

Conversation

gratcliff
Copy link
Member

@gratcliff gratcliff commented Sep 15, 2023

🚥 Resolves ISSUE_ID

🧰 Changes

Adding support in Python for a new configuration option, base_log_url (e.g. "docs.example.com"), which is consumed to append a new response header, x-documentation-url (e.g. "docs.example.com/logs/${UUID}").

This configuration option is supported across all other SDKs, accept for Ruby, currently. It's used both to generate a direct link to the log that ReadMe's metrics SDK has just captured, as well as to prevent double log insertion when a request is made via "Try-It" in a documentation site.

🧬 QA & Testing

Provide as much information as you can on how to test what you've done.

@gratcliff gratcliff added the enhancement New feature or request label Sep 19, 2023
@gratcliff gratcliff marked this pull request as ready for review September 19, 2023 17:45
Copy link
Member

@domharrington domharrington left a comment

Choose a reason for hiding this comment

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

LGTM!

expect(typeof har._id).toBe('string');
});

it.todo('should add `x-documentation-url` to response headers', async function () {
Copy link
Member

Choose a reason for hiding this comment

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

Should we bring this test in? Are there any other SDKs that don't yet support this?

Suggested change
it.todo('should add `x-documentation-url` to response headers', async function () {
it('should add `x-documentation-url` to response headers', async function () {

Copy link
Member Author

Choose a reason for hiding this comment

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

Ruby doesn't currently support it. There's a ticket tracking it in the metrics-sdk project! Otherwise, we'll need to integrate some kind of mocking into the integration tests to support this across the board.

@gratcliff gratcliff merged commit 816d886 into main Sep 20, 2023
47 checks passed
@gratcliff gratcliff deleted the gabe/rm-7970-x-documentation-url-support branch September 20, 2023 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants