Class ProcessResource

java.lang.Object
io.opentelemetry.instrumentation.resources.ProcessResource

public final class ProcessResource extends Object
Factory of a Resource which provides information about the current running process.
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.opentelemetry.sdk.resources.Resource
    Returns a Resource which provides information about the current running process.
    static io.opentelemetry.sdk.resources.Resource
    create(boolean emitCommandAttributes)
    Returns a Resource which provides information about the current running process.
    static io.opentelemetry.sdk.resources.Resource
    get()
    Deprecated.
    Use create(true) to retain the current behavior, or create() to omit the potentially sensitive process.command_args and process.command_line attributes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • get

      @Deprecated public static io.opentelemetry.sdk.resources.Resource get()
      Deprecated.
      Use create(true) to retain the current behavior, or create() to omit the potentially sensitive process.command_args and process.command_line attributes. Will be removed in 3.0.
      Returns a factory for a Resource which provides information about the current running process, including the command-line attributes.
    • create

      public static io.opentelemetry.sdk.resources.Resource create()
      Returns a Resource which provides information about the current running process.
    • create

      public static io.opentelemetry.sdk.resources.Resource create(boolean emitCommandAttributes)
      Returns a Resource which provides information about the current running process.

      Warning: command-line resource attributes may contain sensitive information. Only set emitCommandAttributes to true when this risk is acceptable.