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

org.apache.rocketmq.shaded.io.opentelemetry.sdk.logs.LogBuilder Maven / Gradle / Ivy

There is a newer version: 5.0.7
Show newest version
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.apache.rocketmq.shaded.io.opentelemetry.sdk.logs;

import org.apache.rocketmq.shaded.io.opentelemetry.api.common.Attributes;
import org.apache.rocketmq.shaded.io.opentelemetry.context.Context;
import org.apache.rocketmq.shaded.io.opentelemetry.sdk.logs.data.Severity;
import java.time.Instant;
import java.util.concurrent.TimeUnit;

/**
 * Used to construct and emit logs from a {@link LogEmitter}.
 *
 * 

Obtain a {@link LogBuilder} via {@link LogEmitter#logBuilder()}, add properties using the * setters, and emit the log to downstream {@link LogProcessor}(s) by calling {@link #emit()}. */ public interface LogBuilder { /** Set the epoch timestamp using the timestamp and unit. */ LogBuilder setEpoch(long timestamp, TimeUnit unit); /** Set the epoch timestamp using the instant. */ LogBuilder setEpoch(Instant instant); /** Set the context. */ LogBuilder setContext(Context context); /** Set the severity. */ LogBuilder setSeverity(Severity severity); /** Set the severity text. */ LogBuilder setSeverityText(String severityText); /** Set the body string. */ LogBuilder setBody(String body); /** Set the attributes. */ LogBuilder setAttributes(Attributes attributes); /** Emit the log to downstream {@link LogProcessor}(s). */ void emit(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy