cloudfoundry / java-buildpack-metric-writer

Apache License 2.0
2 stars 4 forks source link

Document expected metrics forwarder API format #1

Closed gberche-orange closed 7 years ago

gberche-orange commented 7 years ago

Readme.md specifies that the metrics writer:

writes metric updates to a Metron endpoint

However, the metron endpoint only supports UDP and GRPC endpoints (according to doc and tests).

The metrics writer tests seem to assume the remote endpoint accepts HTTP JSON endpoints.

Is the metrics writer using metron agent GRPC with protocol buffer 3 builtin json mapping support ? However, grpc specs specify in this case a content type application/grpc+json whereas the metrics writer writes a application/json;charset=UTF-8 content type. In addition, the content of the JSON formatted payload does not seem to match the metron agent V2 envelope format documented by the loggregator api and implemented in protocol buffer files

Is it instead that the metric writer assumes a distinct metrics forwarder service API from Metron agent ? Java buildpack metrics writer doc mentions a Metrics Forwarder Service and not metron agent.

If so, is the metrics forwarder service implementation open source ? Is there plans in the future to directly write to metron agent leveraging official API ?

nebhale commented 7 years ago

Yep, that reference is an artifact one of the many incarnations this project went through. I'll update the docs to be accurate, but it's working against a PCF-specific service that translates from a REST API to the firehose internally. As discussed here, this is a PCF-specific feature to bridge the gap to an OSS delivery of the same functionality.

gberche-orange commented 7 years ago

Sorry I missed this cf-dev@ thread. Thanks @nebhale for your response and pointing me to it!

nebhale commented 7 years ago

@gberche-orange No worries. This addition was done pretty quietly to satisfy a particular customer before the OSS would be ready.