All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opentelemetry.api.logs.LoggerBuilder Maven / Gradle / Ivy

The newest version!
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package io.opentelemetry.api.logs;

/**
 * Builder class for creating {@link Logger} instances.
 *
 * 

{@link Logger}s are identified by their scope name, version, and schema URL. These identifying * fields, along with attributes, combine to form the instrumentation scope, which is attached to * all log records produced by the {@link Logger}. * * @since 1.27.0 */ public interface LoggerBuilder { /** * Set the scope schema URL of the resulting {@link Logger}. Schema URL is part of {@link Logger} * identity. * * @param schemaUrl The schema URL. * @return this */ LoggerBuilder setSchemaUrl(String schemaUrl); /** * Sets the instrumentation scope version of the resulting {@link Logger}. Version is part of * {@link Logger} identity. * * @param instrumentationScopeVersion The instrumentation scope version. * @return this */ LoggerBuilder setInstrumentationVersion(String instrumentationScopeVersion); /** * Gets or creates a {@link Logger} instance. * * @return a {@link Logger} instance configured with the provided options. */ Logger build(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy