Skip to content

[chore] Support a productFamily prop #137

@patricklafrance

Description

@patricklafrance

Currently, all predefined env endoints default to the Workleap Platform services. This is an issue for ShareGate products as they must provide the endpoint URLs by hand.

This issue is about introducing a productFamily property, allowing products to pick the right endpoint URLs.

Before:

import { initializeTelemetry } from "@workleap/telemetry/react";

const client = initializeTelemetry({
    logRocket: {
        appId: "my-app-id"
    },
    honeycomb: {
        namespace: "sample",
        serviceName: "my-app-name",
        apiServiceUrls: [/.+/g],
        options: {
            proxy: "https://sample-proxy"
        }
    },
    mixpanel: {
        productId: "wlp",
        envOrTrackingApiBaseUrl: "development"
    }
});

After:

import { initializeTelemetry } from "@workleap/telemetry/react";

const client = initializeTelemetry({
+   productFamily: "sg",  // default to "wlp" for backward compatibility.
    logRocket: {
        appId: "my-app-id"
    },
    honeycomb: {
        namespace: "sample",
        serviceName: "my-app-name",
        apiServiceUrls: [/.+/g],
        options: {
            proxy: "https://sample-proxy"
        }
    },
    mixpanel: {
        productId: "wlp",
        envOrTrackingApiBaseUrl: "development"
    }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions