Skip to content

Potential incosistency between httpclient and okhttp metrics #1701

@kubamarchwicki

Description

@kubamarchwicki

In OkHttp metrics event listener, the host tag is used to denote the target url / host (https://github.com/micrometer-metrics/micrometer/blob/master/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/okhttp3/OkHttpMetricsEventListener.java#L123) which is slightly different to apache httpclient metrics executor (https://github.com/micrometer-metrics/micrometer/blob/master/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/httpcomponents/MicrometerHttpRequestExecutor.java#L137-L141) where target.host tag is being used.

I personally find the latter better (especially many - including myself) use host tag to denote the machine code is running. I think target.host work better to describe the target host

Wouldn't it be nice'ish to to try to keep the tags coherent between different (two) http clients. I've noticed this while migrating httpclient to okhttp in one of the projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions