Codota Logo
LogEntry.getTrace
Code IndexAdd Codota to your IDE (free)

How to use
getTrace
method
in
com.google.cloud.logging.LogEntry

Best Java code snippets using com.google.cloud.logging.LogEntry.getTrace (Showing top 14 results out of 315)

  • Common ways to obtain LogEntry
private void myMethod () {
LogEntry l =
  • Codota IconLogEntry.Builder logEntryBuilder;logEntryBuilder.build()
  • Smart code suggestions by Codota
}
origin: googleapis/google-cloud-java

@Override
public int hashCode() {
 return Objects.hash(
   logName,
   resource,
   timestamp,
   receiveTimestamp,
   severity,
   insertId,
   httpRequest,
   labels,
   operation,
   getTrace(),
   getSpanId(),
   traceSampled,
   sourceLocation,
   payload);
}
origin: googleapis/google-cloud-java

 private void compareLogEntry(LogEntry expected, LogEntry value) {
  assertEquals(expected, value);
  assertEquals(expected.getLogName(), value.getLogName());
  assertEquals(expected.getResource(), value.getResource());
  assertEquals(expected.getTimestamp(), value.getTimestamp());
  assertEquals(expected.getReceiveTimestamp(), value.getReceiveTimestamp());
  assertEquals(expected.getSeverity(), value.getSeverity());
  assertEquals(expected.getInsertId(), value.getInsertId());
  assertEquals(expected.getHttpRequest(), value.getHttpRequest());
  assertEquals(expected.getLabels(), value.getLabels());
  assertEquals(expected.getOperation(), value.getOperation());
  assertEquals(expected.getTrace(), value.getTrace());
  assertEquals(expected.getSpanId(), value.getSpanId());
  assertEquals(expected.getTraceSampled(), value.getTraceSampled());
  assertEquals(expected.getSourceLocation(), value.getSourceLocation());
  assertEquals(expected.getPayload(), value.getPayload());
  assertEquals(expected.hashCode(), value.hashCode());
 }
}
origin: googleapis/google-cloud-java

assertNull(logEntry.getHttpRequest());
assertNull(logEntry.getOperation());
assertNull(logEntry.getTrace());
assertNull(logEntry.getSpanId());
assertFalse(logEntry.getTraceSampled());
assertNull(logEntry.getHttpRequest());
assertNull(logEntry.getOperation());
assertNull(logEntry.getTrace());
assertNull(logEntry.getSpanId());
assertFalse(logEntry.getTraceSampled());
origin: googleapis/google-cloud-java

@Override
public boolean equals(Object obj) {
 if (obj == this) {
  return true;
 }
 if (!(obj instanceof LogEntry)) {
  return false;
 }
 LogEntry other = (LogEntry) obj;
 return Objects.equals(logName, other.logName)
   && Objects.equals(resource, other.resource)
   && Objects.equals(timestamp, other.timestamp)
   && Objects.equals(receiveTimestamp, other.receiveTimestamp)
   && Objects.equals(severity, other.severity)
   && Objects.equals(insertId, other.insertId)
   && Objects.equals(httpRequest, other.httpRequest)
   && Objects.equals(labels, other.labels)
   && Objects.equals(operation, other.operation)
   && Objects.equals(getTrace(), other.getTrace())
   && Objects.equals(getSpanId(), other.getSpanId())
   && Objects.equals(traceSampled, other.traceSampled)
   && Objects.equals(sourceLocation, other.sourceLocation)
   && Objects.equals(payload, other.payload);
}
origin: googleapis/google-cloud-java

assertEquals(LABELS, STRING_ENTRY.getLabels());
assertEquals(OPERATION, STRING_ENTRY.getOperation());
assertEquals(TRACE, STRING_ENTRY.getTrace());
assertEquals(SPAN_ID, STRING_ENTRY.getSpanId());
assertEquals(TRACE_SAMPLED, STRING_ENTRY.getTraceSampled());
assertEquals(LABELS, JSON_ENTRY.getLabels());
assertEquals(OPERATION, JSON_ENTRY.getOperation());
assertEquals(TRACE, JSON_ENTRY.getTrace());
assertEquals(SPAN_ID, JSON_ENTRY.getSpanId());
assertEquals(TRACE_SAMPLED, JSON_ENTRY.getTraceSampled());
assertEquals(LABELS, PROTO_ENTRY.getLabels());
assertEquals(OPERATION, PROTO_ENTRY.getOperation());
assertEquals(TRACE, PROTO_ENTRY.getTrace());
assertEquals(SPAN_ID, PROTO_ENTRY.getSpanId());
assertEquals(TRACE_SAMPLED, PROTO_ENTRY.getTraceSampled());
assertEquals(LABELS, logEntry.getLabels());
assertEquals(OPERATION, logEntry.getOperation());
assertEquals(TRACE, logEntry.getTrace());
assertEquals(SPAN_ID, logEntry.getSpanId());
assertEquals(TRACE_SAMPLED, logEntry.getTraceSampled());
origin: googleapis/google-cloud-java

builder.setTrace(getTrace());
origin: googleapis/google-cloud-java

assertEquals(ImmutableMap.of("key", "value"), logEntry.getLabels());
assertEquals(Operation.of("otherId", "otherProducer"), logEntry.getOperation());
assertEquals("otherTrace", logEntry.getTrace());
assertEquals("otherSpanId", logEntry.getSpanId());
assertFalse(logEntry.getTraceSampled());
origin: com.google.cloud/google-cloud-logging

@Override
public int hashCode() {
 return Objects.hash(
   logName,
   resource,
   timestamp,
   receiveTimestamp,
   severity,
   insertId,
   httpRequest,
   labels,
   operation,
   getTrace(),
   getSpanId(),
   traceSampled,
   sourceLocation,
   payload);
}
origin: census-instrumentation/opencensus-java

@Test
public void enhanceLogEntry_AddBlankSpanToLogEntry() {
 LogEntry logEntry =
   getEnhancedLogEntry(
     new OpenCensusTraceLoggingEnhancer("my-test-project-7"), BlankSpan.INSTANCE);
 assertFalse(logEntry.getTraceSampled());
 assertThat(logEntry.getTrace())
   .isEqualTo("projects/my-test-project-7/traces/00000000000000000000000000000000");
 assertThat(logEntry.getSpanId()).isEqualTo("0000000000000000");
}
origin: com.google.cloud/google-cloud-logging

@Override
public boolean equals(Object obj) {
 if (obj == this) {
  return true;
 }
 if (!(obj instanceof LogEntry)) {
  return false;
 }
 LogEntry other = (LogEntry) obj;
 return Objects.equals(logName, other.logName)
   && Objects.equals(resource, other.resource)
   && Objects.equals(timestamp, other.timestamp)
   && Objects.equals(receiveTimestamp, other.receiveTimestamp)
   && Objects.equals(severity, other.severity)
   && Objects.equals(insertId, other.insertId)
   && Objects.equals(httpRequest, other.httpRequest)
   && Objects.equals(labels, other.labels)
   && Objects.equals(operation, other.operation)
   && Objects.equals(getTrace(), other.getTrace())
   && Objects.equals(getSpanId(), other.getSpanId())
   && Objects.equals(traceSampled, other.traceSampled)
   && Objects.equals(sourceLocation, other.sourceLocation)
   && Objects.equals(payload, other.payload);
}
origin: census-instrumentation/opencensus-java

@Test
public void enhanceLogEntry_AddNonSampledSpanToLogEntry() {
 LogEntry logEntry =
   getEnhancedLogEntry(
     new OpenCensusTraceLoggingEnhancer("my-test-project-6"),
     new TestSpan(
       SpanContext.create(
         TraceId.fromLowerBase16("72c905c76f99e99974afd84dc053a480"),
         SpanId.fromLowerBase16("731e102335b7a5a0"),
         TraceOptions.builder().setIsSampled(false).build(),
         EMPTY_TRACESTATE)));
 assertFalse(logEntry.getTraceSampled());
 assertThat(logEntry.getTrace())
   .isEqualTo("projects/my-test-project-6/traces/72c905c76f99e99974afd84dc053a480");
 assertThat(logEntry.getSpanId()).isEqualTo("731e102335b7a5a0");
}
origin: census-instrumentation/opencensus-java

@Test
public void enhanceLogEntry_ConvertNullProjectIdToEmptyString() {
 LogEntry logEntry =
   getEnhancedLogEntry(
     new OpenCensusTraceLoggingEnhancer(null),
     new TestSpan(
       SpanContext.create(
         TraceId.fromLowerBase16("bfb4248a24325a905873a1d43001d9a0"),
         SpanId.fromLowerBase16("6f23f9afd448e272"),
         TraceOptions.builder().setIsSampled(true).build(),
         EMPTY_TRACESTATE)));
 assertThat(logEntry.getTrace()).isEqualTo("projects//traces/bfb4248a24325a905873a1d43001d9a0");
}
origin: census-instrumentation/opencensus-java

@Test
public void enhanceLogEntry_AddSampledSpanToLogEntry() {
 LogEntry logEntry =
   getEnhancedLogEntry(
     new OpenCensusTraceLoggingEnhancer("my-test-project-3"),
     new TestSpan(
       SpanContext.create(
         TraceId.fromLowerBase16("4c6af40c499951eb7de2777ba1e4fefa"),
         SpanId.fromLowerBase16("de52e84d13dd232d"),
         TraceOptions.builder().setIsSampled(true).build(),
         EMPTY_TRACESTATE)));
 assertTrue(logEntry.getTraceSampled());
 assertThat(logEntry.getTrace())
   .isEqualTo("projects/my-test-project-3/traces/4c6af40c499951eb7de2777ba1e4fefa");
 assertThat(logEntry.getSpanId()).isEqualTo("de52e84d13dd232d");
}
origin: com.google.cloud/google-cloud-logging

builder.setTrace(getTrace());
com.google.cloud.loggingLogEntrygetTrace

Javadoc

Returns the resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to `//tracing.googleapis.com`.

Popular methods of LogEntry

  • newBuilder
    Returns a builder for LogEntry objects given the entry payload.
  • getSpanId
    Returns the ID of the trace span associated with the log entry, if any.
  • fromPb
  • getSeverity
    Returns the severity of the log entry. If not set, Severity#DEFAULT is used.
  • getTimestamp
    Returns the time at which the event described by the log entry occurred, in milliseconds. If omitted
  • getTraceSampled
    Returns the sampling decision of the trace span associated with the log entry, or falseif there is n
  • of
    Creates a LogEntry object given the log name, the monitored resource and the entry payload.
  • toBuilder
    Returns a Builder for this log entry.
  • toPb
  • toPbFunction
  • <init>
  • getHttpRequest
    Returns information about the HTTP request associated with this log entry, if applicable.
  • <init>,
  • getHttpRequest,
  • getInsertId,
  • getLabels,
  • getLocation,
  • getLogName,
  • getOperation,
  • getPayload,
  • getReceiveTimestamp

Popular in Java

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • onRequestPermissionsResult (Fragment)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • Reference (javax.naming)
  • JOptionPane (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now