---
title: Service map for Streaming Media & Ads
source: https://docs.newrelic.com/docs/streaming-video-&-ads/view-data-in-newrelic/streaming-video-&-ads-single-application-view/service-maps
---

The Entity Relationship feature connects your Browser or Mobile entities with Media Streaming entities. When video content plays in your web or mobile application, you can track the data flow to the media player entity and monitor cross-platform streaming performance.

With this feature, you can:

-   Monitor video playback performance across applications
-   Identify performance bottlenecks in video delivery
-   Analyze user engagement with video content
-   Track dependencies between services and media streaming infrastructure
-   Visualize entity relationships in service maps
-   Correlate data between application and media streaming telemetry
-   Troubleshoot video playback issues

## Prerequisites

Before establishing entity relationships, ensure you have:

-   An active Browser or Mobile monitoring entity
-   An active Media Streaming monitoring entity
-   Parent app ID configured in your media streaming instrumentation

## Configure Streaming Media & Ads with browser/mobile

### Configure parent application id

Pass your Browser or Mobile entity's application ID and media account ID as custom attributes when initializing the media streaming tracker. These custom attributes establish the relationship between entities.

**Find your Browser or Mobile app ID:**

1.  Navigate to **[one.newrelic.com](https://one.newrelic.com) > All entities**
2.  Select your Browser or Mobile entity
3.  Copy the **application ID** from the entity details or URL

    **For Browser applications:**

    ```javascript
    // Initialize the media streaming tracker with custom attributes
    const options = {
      info: {
        beacon: "bam-cell.nr-data.net",
        applicationID: "YOUR_MEDIA_APPLICATION_ID",
        licenseKey: "YOUR_LICENSE_KEY"
      },
      customData: {
        parentAppId: YOUR_BROWSER_APP_ID, // Browser entity app ID
        mediaAccountId: YOUR_MEDIA_ACCOUNT_ID // Media account ID
      }
    };

    const player = videojs('my-video');
    const tracker = new VideojsTracker(player, options);
    ```

    **For Android applications:**

    ```java
    // Initialize the media streaming tracker with custom attributes
    Map<String, Object> customData = new HashMap<>();
    customData.put("parentAppId", YOUR_MOBILE_APP_ID); // Mobile entity app ID
    customData.put("mediaAccountId", YOUR_MEDIA_ACCOUNT_ID); // Media account ID

    Map<String, Object> config = new HashMap<>();
    config.put("applicationID", "YOUR_MEDIA_APPLICATION_ID");
    config.put("licenseKey", "YOUR_LICENSE_KEY");
    config.put("customData", customData);

    NewRelicVideoTracker tracker = new NewRelicVideoTracker(config);
    tracker.init(player);
    ```

    **For iOS applications:**

    ```swift
    // Initialize the media streaming tracker with custom attributes
    let customData: [String: Any] = [
        "parentAppId": YOUR_MOBILE_APP_ID, // Mobile entity app ID
        "mediaAccountId": YOUR_MEDIA_ACCOUNT_ID // Media account ID
    ]

    let config: [String: Any] = [
        "applicationID": "YOUR_MEDIA_APPLICATION_ID",
        "licenseKey": "YOUR_LICENSE_KEY",
        "customData": customData
    ]

    let tracker = NewRelicVideoTracker(config: config)
    tracker.initialize(player: player)
    ```

    > #### ⚠️ IMPORTANT
    >
    > The `parentAppId` and `mediaAccountId` must be passed as custom attributes. The `parentAppId` must exactly match the application ID of your Browser or Mobile entity. A mismatch will prevent the relationship from being established.

### Entity creation

1.  Navigate to New Relic and create/verify your Browser entity is active
2.  Create your Media Streaming entity in Streaming Video & Ads
3.  Confirm both entities are reporting data successfully

### Establish relationship

1.  Deploy your application with the parent app ID configuration
2.  Generate user activity that flows from browser/mobile to media streaming
3.  Wait 1-2 minutes for the relationship to be established automatically

### Verification

1.  In Browser entity:

-   Navigate to your Browser entity
-   Check the **[Dependencies](https://docs.newrelic.com/docs/new-relic-solutions/new-relic-one/ui-data/explore-downstream-dependencies-new-relic-one/)** section
-   Verify the media streaming entity appears as a connected service

2.  In Service maps for Streaming Video & Ads:

-   Navigate to your Media Streaming entity
-   Verify the parent relationship is visible in service maps
-   Access the [Service Map](docs/new-relic-solutions/new-relic-one/ui-data/service-maps/service-maps/) view
-   Confirm both entities are displayed with connection lines
-   Use the query `FROM Relationship SELECT * where targetEntityGuid = '<media_streaming_entity_guid>'` to verify the relationship type shows as **connects_to**

### Monitoring & analysis

-   Use Service Maps to visualize the complete user journey
-   Monitor dependency health and performance metrics
-   Cross-reference data between related entities for comprehensive analysis
