Tabnine Logo
LogEntry.getSpanId
Code IndexAdd Tabnine to your IDE (free)

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

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

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

@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

builder.setSpanId(getSpanId());
origin: googleapis/google-cloud-java

assertNull(logEntry.getOperation());
assertNull(logEntry.getTrace());
assertNull(logEntry.getSpanId());
assertFalse(logEntry.getTraceSampled());
assertNull(logEntry.getSourceLocation());
assertNull(logEntry.getOperation());
assertNull(logEntry.getTrace());
assertNull(logEntry.getSpanId());
assertFalse(logEntry.getTraceSampled());
assertNull(logEntry.getSourceLocation());
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

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

assertEquals(Operation.of("otherId", "otherProducer"), logEntry.getOperation());
assertEquals("otherTrace", logEntry.getTrace());
assertEquals("otherSpanId", logEntry.getSpanId());
assertFalse(logEntry.getTraceSampled());
assertEquals(
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: 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_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: 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_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.setSpanId(getSpanId());
com.google.cloud.loggingLogEntrygetSpanId

Javadoc

Returns the ID of the trace span associated with the log entry, if any.

Popular methods of LogEntry

  • newBuilder
    Returns a builder for LogEntry objects given the entry payload.
  • getTrace
    Returns the resource name of the trace associated with the log entry, if any. If it contains a relat
  • 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

  • Finding current android device location
  • getApplicationContext (Context)
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now