mirror of
https://github.com/plausible/analytics.git
synced 2024-11-23 03:04:43 +03:00
enrich with information about app node (#4592)
This commit is contained in:
parent
59c7ce2ef1
commit
234d63e549
@ -197,11 +197,14 @@ build_metadata =
|
||||
_fallback = %{}
|
||||
end
|
||||
|
||||
app_host = get_var_from_path_or_env(config_dir, "APP_HOST")
|
||||
|
||||
runtime_metadata = [
|
||||
version: get_in(build_metadata, ["labels", "org.opencontainers.image.version"]),
|
||||
commit: get_in(build_metadata, ["labels", "org.opencontainers.image.revision"]),
|
||||
created: get_in(build_metadata, ["labels", "org.opencontainers.image.created"]),
|
||||
tags: get_in(build_metadata, ["tags"])
|
||||
tags: get_in(build_metadata, ["tags"]),
|
||||
app_host: app_host
|
||||
]
|
||||
|
||||
config :plausible, :runtime_metadata, runtime_metadata
|
||||
@ -486,7 +489,10 @@ config :sentry,
|
||||
dsn: sentry_dsn,
|
||||
environment_name: env,
|
||||
release: sentry_app_version,
|
||||
tags: %{app_version: sentry_app_version},
|
||||
tags: %{
|
||||
app_version: sentry_app_version,
|
||||
app_host: app_host
|
||||
},
|
||||
client: Plausible.Sentry.Client,
|
||||
send_max_attempts: 1,
|
||||
before_send: {Plausible.SentryFilter, :before_send}
|
||||
|
@ -41,6 +41,7 @@ defmodule Plausible.OpenTelemetry do
|
||||
[
|
||||
{"service.name", "analytics"},
|
||||
{"service.namespace", "plausible"},
|
||||
{"service.instance.app_host", runtime_metadata[:app_host]},
|
||||
{"service.instance.id", runtime_metadata[:host]},
|
||||
{"service.version", runtime_metadata[:version]}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user