microsoft.opentelemetry.a365.core.models.service_endpoint module

class microsoft.opentelemetry.a365.core.models.service_endpoint.ServiceEndpoint(hostname, port=None, url=None)[source]

Bases: object

Represents a service endpoint with hostname, optional port and full URL.

hostname: str

The hostname of the service endpoint.

port: int | None = None

The port of the service endpoint.

url: str | None = None

Optional full endpoint URL. Only supply URLs safe to record in telemetry.

classmethod from_url(url)[source]

Create an endpoint from an absolute URL, retaining its path and query.

Raises:

ValueError – If the URL lacks a scheme or hostname, or has an invalid port.

Return type:

ServiceEndpoint