Skip to content

Commit

Permalink
fix(shared/metrics): add missing service.instance.id resource
Browse files Browse the repository at this point in the history
  • Loading branch information
darkyzhou committed Mar 28, 2023
1 parent d784e97 commit 6213977
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/shared/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ pub static METRICS_RESOURCE: Lazy<Resource> = Lazy::new(|| {
"service.version",
conf::env::COMMIT_TAG.or(*conf::env::COMMIT_SHA).unwrap_or("unknown"),
),
KeyValue::new(
"service.instance.id",
format!("{}-{}", *conf::HOSTNAME, nano_id::base62::<8>()),
),
KeyValue::new("host.name", conf::HOSTNAME.clone()),
];

Expand Down

0 comments on commit 6213977

Please sign in to comment.