k1LoW/runn

Specify the header name for the trace header

k2tzumi opened this issue ยท 5 comments

By default, the trace header is fixed to the header X-Runn-Trace.

Allow header names to be specified as follows

runners:
  myapi:
    endpoint: https://api.github.com
    trace:
      enable: true
      headername: "request-id"
k1LoW commented

What are some cases in which you would like to change the header name?

see.
https://rarejob-tech-dept.hatenablog.com/entry/2020/03/19/190000

The application under test had the ability to log unique IDs between microservices and we wanted to use runn's unique Id as is.

k1LoW commented

It looks good about adding the ability to change the header name ๐Ÿ‘

On the other hand, if it is necessary to change the format of the trace ID, it would be better to consider it as a separate feature.

@k1LoW

We are considering making existing fixed header names constant.
Is it intended that the notation is different between gRPC and HTTP? If it is not a problem, we would like to unify them, but we would like your opinion.

k1LoW commented

Is it intended that the notation is different between gRPC and HTTP?

HTTP headers are expressed in CamelCase, but gRPC headers only allow lowercase letters.

However, since it is lowercased inside, it should be able to be constant value without any problem.

https://github.com/grpc/grpc-go/blob/dbbcf59957fec0bd58063224cbf105b3b3698d4e/metadata/metadata.go#L116