com.google.apphosting.api

## Interface ApiProxy.EnvironmentWithTrace

- All Superinterfaces:
    ApiProxy.Environment
  Enclosing class:
    ApiProxy

      public static interface ApiProxy.EnvironmentWithTrace
      extends ApiProxy.Environment

  A specialization of Environment with call-tracing metadata.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Optional<java.lang.String>` | `getSpanId()` Get the span id of the current request, which can be used to identify a span within a trace.
    `java.util.Optional<java.lang.String>` | `getTraceId()` Get the trace id of the current request, which can be used to correlate log messages belonging to that request.

    - ### Methods inherited from interface com.google.apphosting.api.ApiProxy.Environment

      `getAppId, getAttributes, getAuthDomain, getEmail, getModuleId, getRemainingMillis, getRequestNamespace, getVersionId, isAdmin, isLoggedIn`

- - ### Method Detail

    - #### getTraceId

          java.util.Optional<java.lang.String> getTraceId()

      Get the trace id of the current request, which can be used to correlate log messages belonging to that request.

    - #### getSpanId

          java.util.Optional<java.lang.String> getSpanId()

      Get the span id of the current request, which can be used to identify a span within a trace.