Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Kibana 7 Quick Start Guide

You're reading from   Kibana 7 Quick Start Guide Visualize your Elasticsearch data with ease

Arrow left icon
Product type Paperback
Published in Jan 2019
Publisher Packt
ISBN-13 9781789804034
Length 172 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Anurag Srivastava Anurag Srivastava
Author Profile Icon Anurag Srivastava
Anurag Srivastava
Arrow right icon
View More author details
Toc

Configure Django application with APM

I will take an example of an application for blog creation and listing API using Python Django framework. First, we have to install the APM agent for Python Django:

pip install elastic-apm

Then, we have to configure the agent with the Django application; we need to make the following changes in the settings.py file:

# Add the agent to the installed apps
INSTALLED_APPS = (
'elasticapm.contrib.django',
# ...
)

ELASTIC_APM = {
# Set required service name. Allowed characters:
# a-z, A-Z, 0-9, -, _, and space
'SERVICE_NAME': 'django application',

# Use if APM Server requires a token
'SECRET_TOKEN': 'mysecrettoken',

# Set custom APM Server URL (default: http://localhost:8200)
'SERVER_URL': 'http://localhost:8200',
}

# To send performance metrics, add our tracing middleware...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime