You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of a question than an issue. Is it possible to emit traces using a service name that corresponds to the individual apps in an umbrella?
For example, if I have apps/a, apps/b, and apps/c with a's application.ex starting the SpandexDatadog.ApiServer, can I emit traces from b that would show up in datadog under the service name b?
I have an umbrella project that's structured like this and all the traces appear under the a service name.
Thanks!
The text was updated successfully, but these errors were encountered:
Hey @tjstankus. I recently solved that by using Conn.put_private in a plug to store the app name, and pulled it out in a customize_metadata function.
def customize_metadata(conn) do
service = Map.get(conn.private, :service, :elixir)
meta =
conn
|> SpandexPhoenix.default_metadata()
|> Keyword.put(:service, service)
|> Keyword.put(:resource, compute_new_resource(conn))
case conn.status in 500..599 do
true -> Keyword.put(meta, :error, error?: true)
false -> meta
end
end
This is more of a question than an issue. Is it possible to emit traces using a service name that corresponds to the individual apps in an umbrella?
For example, if I have
apps/a
,apps/b
, andapps/c
witha
's application.ex starting theSpandexDatadog.ApiServer
, can I emit traces fromb
that would show up in datadog under the service nameb
?I have an umbrella project that's structured like this and all the traces appear under the
a
service name.Thanks!
The text was updated successfully, but these errors were encountered: