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

Propagators should support all forms of Instana Headers #29

Merged
merged 4 commits into from
Oct 13, 2017

Conversation

pglombardo
Copy link
Contributor

@pglombardo pglombardo commented Oct 10, 2017

Depending on where Inject and Extract are being called from, the HTTP headers can vary in capitalization and prefix.

For example, in Flask and Django, in the middleware, HTTP headers are presented as all upper case, underscores and prefixed with HTTP_ (Ruby also does this in Rack):

  • HTTP_X_INSTANA_T

Yet in making requests via the requests package, HTTP headers are in the on-the-wire format:

  • X-Instana-T

Our propagators should support all variations:

  • Capitalization
  • Underscores versus dashes
  • Prefixed or not (only support HTTP_ for now)

@pglombardo
Copy link
Contributor Author

pglombardo commented Oct 13, 2017

With this PR, we support Extract as X-Instana-[TS] and the alternate form HTTP_X_INSTANA_[TS].

For Inject, we only support Inject with X-Instana-[TS] as OpenTracing has no mechanism to signal otherwise.

@pglombardo pglombardo merged commit 45832be into master Oct 13, 2017
@pglombardo pglombardo deleted the better_http_propagator branch October 13, 2017 16:26
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.

1 participant