nats-io / nats-architecture-and-design

Architecture and Design Docs
Apache License 2.0
177 stars 20 forks source link

add ADR-33 consistant metadata to micro service and endpoints #205

Closed ripienaar closed 1 year ago

ripienaar commented 1 year ago

We had some feedback in the new tech previews channel and ADR-33 came later than micro ADR so seems good to have this for consistency.

The use case is that these annotations can be read to build monitoring, ingress and more in a zero config manner.

ripienaar commented 1 year ago

Go PR adding support for this https://github.com/nats-io/nats.go/pull/1231 hope it clarifies

ripienaar commented 1 year ago

I think we need to add metadata also to endpoint stats, today its only in schema but in order to build a UI that just shows info about a service we already need to call info (no endpoint details just subjects) and then stats to get endpoint details. As is we would also need to call schema to get endpoint metadata and then a bunch of work to combine this information.

So before I send a updated PR just wanted to solicit feedback on that @piotrpio @aricart

aricart commented 1 year ago

@ripienaar the funny thing is - this is what I already did - when you call stats, the metadata is included. I think schema shouldn't be part of that, as that may be rather verbose.

The part I need to verify on my PR is that schema is including metadata as well.

ripienaar commented 1 year ago

@ripienaar the funny thing is - this is what I already did - when you call stats, the metadata is included. I think schema shouldn't be part of that, as that may be rather verbose.

The part I need to verify on my PR is that schema is including metadata as well.

You need to be careful about just adding random stuff as the CLI will schema validate responses :)