Settings API - Automatic injection schema table

Automatic injection (builtin:rum.web.automatic-injection)

Dynatrace OneAgent automatically injects the RUM JavaScript into the HTML head of monitored application pages. Use this page to control and adjust the injection.

Schema IDSchema groupsScope
builtin:rum.web.automatic-injection
  • group:rum-injection
APPLICATION - Web application
GETManagedhttps://{your-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:rum.web.automatic-injection
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/settings/schemas/builtin:rum.web.automatic-injection
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:rum.web.automatic-injection

Authentication

To execute this request, you need an access token with Read settings (settings.read) scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

PropertyTypeDescriptionRequired
Real User Monitoring code source
monitoringCodeSourceSection
MonitoringCodeSource-required
Snippet format
snippetFormat
SnippetFormat

Code Snippet: OneAgent injects an inline script that initializes Dynatrace and dynamically downloads the monitoring code into your application. Use when you want to inject the monitoring code in deferred mode.

Inline Code: OneAgent injects the configuration and the monitoring code inline into your application. Use this injection type when you need to keep the number of web requests at a minimum.

OneAgent JavaScript Tag: OneAgent injects a JavaScript tag into your application, containing the configuration and a link to the monitoring code. This is our default injection type, since it's most versatile.

Compare the different injection formats.

required
Cache control headers
cacheControlHeaders
CacheControlHeaders-required
The MonitoringCodeSource object
PropertyTypeDescriptionRequired
Real User Monitoring code source
codeSource
text-required
Specify path for RUM monitoring code
monitoringCodePath
text

Specify the URL path under which the RUM monitoring code is requested. By default, the path is set to the root or the context root. A custom URL path may be necessary if your server operates behind a firewall.

optional
The SnippetFormat object
PropertyTypeDescriptionRequired
Snippet format
snippetFormat
text-required
Load the monitoring code
codeSnippetType
enum
  • SYNCHRONOUSLY
  • DEFERRED
required
The CacheControlHeaders object
PropertyTypeDescriptionRequired
Optimize the value of cache control headers for use with Dynatrace Real User Monitoring
cacheControlHeaders
boolean

How to ensure timely configuration updates for automatic injection?

required