Hi how can I know the the APM env variables?

Hi,
I have an app in python,
How can I know these:

app.config['ELASTIC_APM'] = {
    'SERVICE_NAME': '<**SERVICE-NAME**>',
    'SECRET_TOKEN': '<**SECRET-TOKEN**>',
}
apm = ElasticAPM(app)

I didnt see something about that in the kibana:
https://mail.google.com/mail/u/0?ui=2&ik=fb202b4c3e&attid=0.1&permmsgid=msg-a:r-9218835480858602959&th=181820d07b2a81c4&view=fimg&fur=ip&sz=s0-l75-ft&attbid=ANGjdJ_R5OOCLgJKGxzGhaHTrzfPJfORi8aZOouyypXmMgRTgAFGuE6Ad3xoZNW8ctAUalVcZkvzGhM8Pr3_mjbYhrVBs4LWASZcaMZDBGrALghiS5e0JLV33lYbgWE&disp=emb&realattid=ii_l4mzedj20

thanks

Hi @Frida

You can set SERVICE_NAME to a value that describes the service/app that you are instrumenting, e.g. "webshop-app". Note that the service name must only contain characters from the ASCII alphabet, numbers, dashes, underscores, and spaces.

As for the SECRET_TOKEN, it depends if you use Elastic Cloud or if you run APM Server yourself. Elastic Cloud will generate a secret token for you. If you run APM Server yourself, you can set the token in the APM integration settings, see the docs.

If you need to generate a secure token, you can use this snippet. Just run it in your terminal:

python -c "import secrets; print(secrets.token_urlsafe(32))"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.