[DRAFT] Update name and interface for textmapgetter/textmapsetter#45
[DRAFT] Update name and interface for textmapgetter/textmapsetter#45plantfansam wants to merge 5 commits intoyangxikun:mainfrom
Conversation
|
Seems we need a new "trace context propagator" to extract Sorry for the quickly say "sure" on #44. After checking opentelemetry specification, I found there was not spec about Does your service need this feature now? |
No problem! We do need this feature, but we can implement elsewhere if you do not want it in |
Yes, I have a draft of that here 😄 plantfansam#2. I think it makes sense to keep carrier as |
|
Closing this until we actually want it. |
When working on #44 (see draft), I learned that
ngx.req.set_headerdoes not set response headers. There is also a special method for getting response headers (ngx.resp.get_headers()). To avoid confusion, I renamedtext_map_getterandtext_map_settertorequest_header_getterandrequest_header_setter.To maintain symmetry between
request_header_*andresponse_header_*, I also updated the propagators to assume thatngxwas passed to them (instead ofngx.req). If we do not change this assumption, then the trace context propagator and baggage propagator would acceptngx.reqas a carrier, while thetraceresponsepropagator would acceptngx.This would be a breaking change. It's OK if you'd rather not change the existing propagators @yangxikun, just let me know.