@microsoft/opentelemetry
    Preparing search index...

    Type Alias TokenResolver

    TokenResolver: (
        agentId: string,
        tenantId: string,
        authScopes?: string[],
    ) => string | null | Promise<string | null>

    A function that resolves an authentication token for the given agent and tenant. Return null if a token cannot be provided.

    Type Declaration

      • (
            agentId: string,
            tenantId: string,
            authScopes?: string[],
        ): string | null | Promise<string | null>
      • Parameters

        • agentId: string

          The identifier of the agent whose telemetry is being exported.

        • tenantId: string

          The identifier of the tenant that owns the agent.

        • OptionalauthScopes: string[]

          Optional OAuth scopes to request for the token.

        Returns string | null | Promise<string | null>

        The bearer token, or null (synchronously or as a promise) when no token is available.