Skip to content

Commit 8f95039

Browse files
committed
Add section documenting EUM helper usage.
1 parent f1cd290 commit 8f95039

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,31 @@ If you use uWSGI in forking workers mode, you must specify `--lazy-apps` (or `la
5757

5858
The instana package will automatically collect key metrics from your Python processes. Just install and go.
5959

60+
## Want End User Monitoring?
61+
62+
Instana provides deep end user monitoring that links server side traces with browser events to give you a complete view from server to browser.
63+
64+
For Python templates and views, get your EUM API key from your Instana dashboard and you can call `instana.helpers.eum_snippet(api_key='abc')` from within your layout file. This will output
65+
a small javascript snippet of code to instrument browser events. It's based on [Weasel](https://github.com/instana/weasel). Check it out.
66+
67+
As an example, you could do the following:
68+
69+
```python
70+
from instana.helpers import eum_snippet
71+
72+
instana.api_key = 'abc'
73+
meta_kvs = { 'username': user.name }
74+
75+
# This will return a string containing the EUM javascript for the layout or view.
76+
eum_snippet(meta=meta_kvs)
77+
```
78+
79+
The optional second argument to `eum_snippet()` is a hash of metadata key/values that will be reported along with the browser instrumentation.
80+
81+
![Instana EUM example with metadata](https://s3.amazonaws.com/instana/Instana+Gameface+EUM+with+metadata+2016-12-22+at+15.32.01.png)
82+
83+
See also the [End User Monitoring](https://docs.instana.io/products/website_monitoring/#configuration) in the Instana documentation portal.
84+
6085
## OpenTracing
6186

6287
This Python package supports [OpenTracing](http://opentracing.io/). When using this package, the OpenTracing tracer (`opentracing.tracer`) is automatically set to the `InstanaTracer`.

0 commit comments

Comments
 (0)