# Replace these values with your AppSignal application name, environment
# (autodetected from Mix) and push API key. These are used by the resource attributes
# configuration below.
name = "My app"
push_api_key = "0000-0000-0000-0000"
environment = if Kernel.function_exported?(Mix, :env, 0) do
to_string(Mix.env())
else
"development"
end
# Set the name of the service that is being monitored. A common choice is the
# name of the framework used. This is used to group traces and metrics in AppSignal.
service_name = "My service name"
# Replace `http://localhost:8099` with the address of your AppSignal collector
# if it's running on another host.
endpoint = "http://localhost:8099"
{:ok, hostname} = :inet.gethostname()
{revision, _exitcode} = System.cmd("git", ["log", "--pretty=format:%h", "-n 1"])
config :opentelemetry,
span_processor: :batch,
traces_exporter: :otlp,
resource: [
{"appsignal.config.name", name},
{"appsignal.config.environment", environment},
{"appsignal.config.push_api_key", push_api_key},
{"appsignal.config.revision", revision},
{"appsignal.config.language_integration", "elixir"},
{"appsignal.config.app_path", File.cwd!()},
{"host.name", hostname},
{"service.name", service_name}
]
config :opentelemetry_exporter,
otlp_protocol: :http_protobuf,
otlp_endpoint: endpoint