| Constructor and Description |
|---|
GcpLogSink(String projectId,
Map<String,String> locationTags,
ObservabilityConfig config,
Collection<String> servicesToExclude,
TraceLoggingHelper traceLoggingHelper)
Retrieves a single instance of GcpLogSink.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes Cloud Logging Client.
|
void |
write(GrpcLogRecord logProto,
io.opencensus.trace.SpanContext spanContext)
Writes logs to GCP Cloud Logging.
|
public GcpLogSink(String projectId, Map<String,String> locationTags, ObservabilityConfig config, Collection<String> servicesToExclude, TraceLoggingHelper traceLoggingHelper)
projectId - GCP project id to write logsservicesToExclude - service names for which log entries should not be generatedpublic void write(GrpcLogRecord logProto, io.opencensus.trace.SpanContext spanContext)