Skip to content

Commit

Permalink
Rename telemetry to tracing [PLEN-70] (digital-asset#16073)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicu-da authored Jan 17, 2023
1 parent 94327f5 commit f370124
Show file tree
Hide file tree
Showing 59 changed files with 87 additions and 87 deletions.
4 changes: 2 additions & 2 deletions language-support/scala/bindings-akka/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ da_scala_library(
"//ledger/ledger-api-client",
"//ledger/ledger-api-common",
"//ledger/ledger-api-domain",
"//observability/telemetry",
"//observability/tracing",
"@maven//:ch_qos_logback_logback_classic",
"@maven//:ch_qos_logback_logback_core",
"@maven//:com_google_api_grpc_proto_google_common_protos",
Expand Down Expand Up @@ -99,7 +99,7 @@ da_scala_test_suite(
"//ledger-api/rs-grpc-bridge",
"//ledger/ledger-api-client",
"//ledger/metrics",
"//observability/telemetry",
"//observability/tracing",
"@maven//:com_google_api_grpc_proto_google_common_protos",
"@maven//:com_typesafe_config",
"@maven//:org_scalatest_scalatest_compatible",
Expand Down
2 changes: 1 addition & 1 deletion language-support/scala/codegen-sample-app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,6 @@ da_scala_test(
"//ledger/sandbox-on-x:sandbox-on-x-test-lib",
"//libs-scala/ports",
"//libs-scala/resources",
"//observability/telemetry",
"//observability/tracing",
],
)
6 changes: 3 additions & 3 deletions ledger/ledger-api-client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ da_scala_library(
"//libs-scala/ports",
"//libs-scala/resources",
"//observability/metrics",
"//observability/telemetry",
"//observability/tracing",
"@maven//:com_google_api_grpc_proto_google_common_protos",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:io_dropwizard_metrics_metrics_core",
Expand Down Expand Up @@ -72,7 +72,7 @@ da_scala_test_suite(
"//libs-scala/contextualized-logging",
"//libs-scala/grpc-utils",
"//observability/metrics",
"//observability/telemetry",
"//observability/tracing",
"@maven//:com_google_api_grpc_proto_google_common_protos",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:io_dropwizard_metrics_metrics_core",
Expand Down Expand Up @@ -123,7 +123,7 @@ da_scala_test_suite(
"//libs-scala/ports",
"//libs-scala/resources",
"//observability/metrics",
"//observability/telemetry",
"//observability/tracing",
"@maven//:ch_qos_logback_logback_classic",
"@maven//:io_netty_netty_handler",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package com.daml.util

import com.daml.telemetry.{NoOpTelemetryContext, TelemetryContext}
import com.daml.tracing.{NoOpTelemetryContext, TelemetryContext}

/** Ctx wraps a value with some contextual information.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package com.daml.ledger.client.services.commands
import akka.stream.scaladsl.{Sink, Source}
import com.daml.ledger.api.testing.utils.AkkaBeforeAndAfterAll
import com.daml.ledger.api.v1.commands.Commands
import com.daml.telemetry.TelemetryContext
import com.daml.tracing.TelemetryContext
import com.daml.util.Ctx
import com.google.protobuf.empty.Empty
import org.mockito.captor.ArgCaptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import com.daml.ledger.api.v1.commands.Commands.DeduplicationPeriod
import com.daml.ledger.api.{SubmissionIdGenerator, domain}
import com.daml.ledger.client.configuration.CommandClientConfiguration
import com.daml.lf.data.Ref
import com.daml.telemetry.NoOpTelemetryContext
import com.daml.tracing.NoOpTelemetryContext
import com.daml.util.Ctx
import com.google.protobuf.duration.Duration
import org.scalatest.matchers.should.Matchers
Expand Down
6 changes: 3 additions & 3 deletions ledger/ledger-api-common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ da_scala_library(
"//libs-scala/resources-grpc",
"//libs-scala/timer-utils",
"//observability/metrics",
"//observability/telemetry",
"//observability/tracing",
"@maven//:commons_codec_commons_codec",
"@maven//:commons_io_commons_io",
"@maven//:io_grpc_grpc_netty",
Expand Down Expand Up @@ -140,8 +140,8 @@ da_scala_test_suite(
"//libs-scala/logging-entries",
"//libs-scala/scala-utils",
"//observability/metrics",
"//observability/telemetry",
"//observability/telemetry:telemetry-test-lib",
"//observability/tracing",
"//observability/tracing:tracing-test-lib",
"@maven//:ch_qos_logback_logback_classic",
"@maven//:ch_qos_logback_logback_core",
"@maven//:com_google_api_grpc_proto_google_common_protos",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package com.daml.ledger.api

import com.daml.ledger.api.v1.transaction.{Transaction, TransactionTree}
import com.daml.telemetry.SpanAttribute
import com.daml.tracing.SpanAttribute

/** Extracts identifiers from Protobuf messages to correlate traces.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package com.daml.platform.server.api.services.domain

import com.daml.ledger.api.messages.command.submission.SubmitRequest
import com.daml.telemetry.TelemetryContext
import com.daml.tracing.TelemetryContext

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import com.daml.metrics.{Metrics, Timed}
import com.daml.platform.api.grpc.GrpcApiService
import com.daml.platform.server.api.services.domain.CommandSubmissionService
import com.daml.platform.server.api.{ProxyCloseable, ValidationLogger}
import com.daml.telemetry.{DefaultTelemetry, SpanAttribute, TelemetryContext}
import com.daml.tracing.{DefaultTelemetry, SpanAttribute, TelemetryContext}
import com.google.protobuf.empty.Empty
import io.grpc.ServerServiceDefinition

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package com.daml.ledger.api

import com.daml.ledger.api.v1.transaction.{Transaction, TransactionTree}
import com.daml.telemetry.SpanAttribute
import com.daml.tracing.SpanAttribute
import org.scalatest.wordspec.AnyWordSpec
import org.scalatest.matchers.should.Matchers._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import com.daml.lf.data.Ref
import com.daml.logging.LoggingContext
import com.daml.metrics.Metrics
import com.daml.platform.server.api.services.domain.CommandSubmissionService
import com.daml.telemetry.{SpanAttribute, TelemetryContext, TelemetrySpecBase}
import com.daml.tracing.{SpanAttribute, TelemetryContext, TelemetrySpecBase}
import org.mockito.captor.ArgCaptor
import org.mockito.{ArgumentMatchersSugar, MockitoSugar}
import org.scalatest.matchers.should.Matchers
Expand Down
6 changes: 3 additions & 3 deletions ledger/participant-integration-api/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ compile_deps = [
"//libs-scala/timer-utils",
"//libs-scala/nameof",
"//libs-scala/struct-json/struct-spray-json",
"//observability/telemetry",
"//observability/tracing",
"//observability/metrics",
"@maven//:com_google_guava_guava",
"@maven//:com_zaxxer_HikariCP",
Expand Down Expand Up @@ -320,8 +320,8 @@ da_scala_test_suite(
"//libs-scala/timer-utils",
"//observability/metrics",
"//observability/metrics:metrics-test-lib",
"//observability/telemetry",
"//observability/telemetry:telemetry-test-lib",
"//observability/tracing",
"//observability/tracing:tracing-test-lib",
"@maven//:ch_qos_logback_logback_classic",
"@maven//:ch_qos_logback_logback_core",
"@maven//:com_github_ben_manes_caffeine_caffeine",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import com.daml.platform.localstore.api.{
}
import com.daml.platform.services.time.TimeProviderType
import com.daml.ports.{Port, PortFiles}
import com.daml.telemetry.TelemetryContext
import com.daml.tracing.TelemetryContext
import io.grpc.{BindableService, ServerInterceptor}
import scalaz.{-\/, \/-}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import com.daml.platform.localstore.api.{
import com.daml.platform.server.api.services.domain.CommandCompletionService
import com.daml.platform.server.api.services.grpc.{GrpcHealthService, GrpcTransactionService}
import com.daml.platform.services.time.TimeProviderType
import com.daml.telemetry.TelemetryContext
import com.daml.tracing.TelemetryContext
import io.grpc.BindableService
import io.grpc.protobuf.services.ProtoReflectionService

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import com.daml.lf.data.Time.Timestamp
import com.daml.logging.LoggingContext.withEnrichedLoggingContext
import com.daml.logging.{ContextualizedLogger, LoggingContext}
import com.daml.platform.configuration.InitialLedgerConfiguration
import com.daml.telemetry.{DefaultTelemetry, SpanKind, SpanName}
import com.daml.tracing.{DefaultTelemetry, SpanKind, SpanName}

import scala.concurrent.ExecutionContext
import scala.concurrent.duration.{Duration => ScalaDuration}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.daml.platform.server.api.services.domain.CommandSubmissionService
import com.daml.platform.server.api.services.grpc.GrpcCommandSubmissionService
import com.daml.platform.services.time.TimeProviderType
import com.daml.scalautil.future.FutureConversion.CompletionStageConversionOps
import com.daml.telemetry.TelemetryContext
import com.daml.tracing.TelemetryContext
import com.daml.timer.Delayed

import java.time.{Duration, Instant}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.daml.platform.apiserver.services.admin.ApiConfigManagementService._
import com.daml.platform.apiserver.services.logging
import com.daml.platform.server.api.ValidationLogger
import com.daml.platform.server.api.validation.FieldValidations
import com.daml.telemetry.{DefaultTelemetry, TelemetryContext}
import com.daml.tracing.{DefaultTelemetry, TelemetryContext}
import io.grpc.{ServerServiceDefinition, StatusRuntimeException}

import scala.concurrent.duration.{Duration, FiniteDuration}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import com.daml.logging.{ContextualizedLogger, LoggingContext}
import com.daml.platform.api.grpc.GrpcApiService
import com.daml.platform.apiserver.services.admin.ApiPackageManagementService._
import com.daml.platform.apiserver.services.logging
import com.daml.telemetry.{DefaultTelemetry, TelemetryContext}
import com.daml.tracing.{DefaultTelemetry, TelemetryContext}
import com.google.protobuf.ByteString
import io.grpc.{ServerServiceDefinition, StatusRuntimeException}
import scalaz.std.either._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import com.daml.platform.server.api.validation.FieldValidations.{
requireResourceVersion,
verifyMetadataAnnotations,
}
import com.daml.telemetry.{DefaultTelemetry, TelemetryContext}
import com.daml.tracing.{DefaultTelemetry, TelemetryContext}
import io.grpc.{ServerServiceDefinition, StatusRuntimeException}
import scalaz.std.either._
import scalaz.std.list._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import com.daml.ledger.participant.state.{v2 => state}
import com.daml.lf.data.Ref
import com.daml.logging.{ContextualizedLogger, LoggingContext}
import com.daml.platform.apiserver.services.admin.SynchronousResponse.{Accepted, Rejected}
import com.daml.telemetry.TelemetryContext
import com.daml.tracing.TelemetryContext
import io.grpc.StatusRuntimeException

import scala.concurrent.duration.FiniteDuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import com.daml.platform.store.entries.PartyLedgerEntry
import com.daml.platform.store.packagemeta.PackageMetadataView
import com.daml.platform.store.packagemeta.PackageMetadataView.PackageMetadata
import com.daml.platform.{ApiOffset, PruneBuffers, TemplatePartiesFilter}
import com.daml.telemetry.{Event, SpanAttribute, Spans}
import com.daml.tracing.{Event, SpanAttribute, Spans}
import io.grpc.StatusRuntimeException
import scalaz.syntax.tag.ToTagOps

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import com.daml.platform.store.dao.events.FilterTableACSReader.{
statefulDeduplicate,
}
import com.daml.platform.store.utils.{ConcurrencyLimiter, QueueBasedConcurrencyLimiter, Telemetry}
import com.daml.telemetry
import com.daml.telemetry.Spans
import com.daml.tracing
import com.daml.tracing.Spans

import scala.util.chaining._
import scala.collection.mutable.ArrayBuffer
Expand Down Expand Up @@ -78,7 +78,7 @@ class TransactionsFlatStreamReader(
case (_, getTransactionsResponse) =>
getTransactionsResponse.transactions.foreach { transaction =>
val event =
telemetry.Event("transaction", TraceIdentifiers.fromTransaction(transaction))
tracing.Event("transaction", TraceIdentifiers.fromTransaction(transaction))
Spans.addEventToSpan(event, span)
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import com.daml.platform.store.dao.{
import com.daml.platform.store.backend.EventStorageBackend
import com.daml.platform.store.dao.events.EventsTable.TransactionConversions
import com.daml.platform.store.utils.Telemetry
import com.daml.telemetry
import com.daml.telemetry.{SpanAttribute, Spans}
import com.daml.tracing
import com.daml.tracing.{SpanAttribute, Spans}
import io.opentelemetry.api.trace.Span

import scala.concurrent.{ExecutionContext, Future}
Expand Down Expand Up @@ -171,7 +171,7 @@ private[dao] final class TransactionsReader(
.mapConcat(TransactionConversions.toGetActiveContractsResponse(_)(contextualizedErrorLogger))
.wireTap(response => {
Spans.addEventToSpan(
telemetry.Event("contract", Map((SpanAttribute.Offset, response.offset))),
tracing.Event("contract", Map((SpanAttribute.Offset, response.offset))),
span,
)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import com.daml.platform.store.dao.events.FilterTableACSReader.{
}
import com.daml.platform.store.dao.{DbDispatcher, EventProjectionProperties, PaginatingAsyncStream}
import com.daml.platform.store.utils.{ConcurrencyLimiter, QueueBasedConcurrencyLimiter, Telemetry}
import com.daml.telemetry
import com.daml.telemetry.Spans
import com.daml.tracing
import com.daml.tracing.Spans

import scala.collection.mutable.ArrayBuffer
import scala.util.chaining._
Expand Down Expand Up @@ -82,7 +82,7 @@ class TransactionsTreeStreamReader(
case (_, response) =>
response.transactions.foreach(txn =>
Spans.addEventToSpan(
telemetry.Event("transaction", TraceIdentifiers.fromTransactionTree(txn)),
tracing.Event("transaction", TraceIdentifiers.fromTransactionTree(txn)),
span,
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package com.daml.platform.store.utils

import com.daml.ledger.offset.Offset
import com.daml.telemetry.{OpenTelemetryTracer, SpanAttribute}
import com.daml.tracing.{OpenTelemetryTracer, SpanAttribute}
import io.opentelemetry.api.trace.Span

object Telemetry {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import com.daml.lf.data.Ref.SubmissionId
import com.daml.lf.data.{Ref, Time}
import com.daml.logging.LoggingContext
import com.daml.platform.apiserver.services.admin.ApiConfigManagementServiceSpec._
import com.daml.telemetry.TelemetrySpecBase._
import com.daml.telemetry.{TelemetryContext, TelemetrySpecBase}
import com.daml.tracing.TelemetrySpecBase._
import com.daml.tracing.{TelemetryContext, TelemetrySpecBase}
import com.google.protobuf.duration.{Duration => DurationProto}
import com.google.protobuf.timestamp.Timestamp
import org.mockito.{ArgumentMatchersSugar, MockitoSugar}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import com.daml.lf.language.Ast.Expr
import com.daml.lf.language.{Ast, LanguageVersion}
import com.daml.lf.testing.parser.Implicits.defaultParserParameters
import com.daml.logging.LoggingContext
import com.daml.telemetry.TelemetrySpecBase._
import com.daml.telemetry.{TelemetryContext, TelemetrySpecBase}
import com.daml.tracing.TelemetrySpecBase._
import com.daml.tracing.{TelemetryContext, TelemetrySpecBase}
import com.google.protobuf.ByteString
import org.mockito.{ArgumentMatchersSugar, MockitoSugar}
import org.scalatest.matchers.should.Matchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import com.daml.logging.LoggingContext
import com.daml.platform.apiserver.services.admin.ApiPartyManagementService.blindAndConvertToProto
import com.daml.platform.apiserver.services.admin.ApiPartyManagementServiceSpec._
import com.daml.platform.localstore.api.{PartyRecord, PartyRecordStore}
import com.daml.telemetry.TelemetrySpecBase._
import com.daml.telemetry.{TelemetryContext, TelemetrySpecBase}
import com.daml.tracing.TelemetrySpecBase._
import com.daml.tracing.{TelemetryContext, TelemetrySpecBase}
import org.mockito.{ArgumentMatchersSugar, MockitoSugar}
import org.scalatest.concurrent.{IntegrationPatience, ScalaFutures}
import org.scalatest.matchers.should.Matchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import com.daml.lf.data.Ref.SubmissionId
import com.daml.lf.data.Time.Timestamp
import com.daml.logging.LoggingContext
import com.daml.platform.configuration.InitialLedgerConfiguration
import com.daml.telemetry.TelemetryContext
import com.daml.tracing.TelemetryContext
import org.mockito.{ArgumentMatchersSugar, MockitoSugar}
import org.scalatest.concurrent.Eventually
import org.scalatest.matchers.should.Matchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import com.daml.platform.apiserver.SeedService
import com.daml.platform.apiserver.configuration.LedgerConfigurationSubscription
import com.daml.platform.apiserver.execution.{CommandExecutionResult, CommandExecutor}
import com.daml.platform.services.time.TimeProviderType
import com.daml.telemetry.{NoOpTelemetryContext, TelemetryContext}
import com.daml.tracing.{NoOpTelemetryContext, TelemetryContext}
import com.google.rpc.status.{Status => RpcStatus}
import io.grpc.{Status, StatusRuntimeException}
import org.mockito.{ArgumentMatchersSugar, MockitoSugar}
Expand Down
2 changes: 1 addition & 1 deletion ledger/participant-state-metrics/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ da_scala_library(
"//ledger/participant-state",
"//libs-scala/contextualized-logging",
"//observability/metrics",
"//observability/telemetry",
"//observability/tracing",
"@maven//:com_google_protobuf_protobuf_java",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import com.daml.lf.transaction.{GlobalKey, SubmittedTransaction, Versioned}
import com.daml.lf.value.Value
import com.daml.logging.LoggingContext
import com.daml.metrics.{Metrics, Timed}
import com.daml.telemetry.TelemetryContext
import com.daml.tracing.TelemetryContext

final class TimedWriteService(delegate: WriteService, metrics: Metrics) extends WriteService {

Expand Down
2 changes: 1 addition & 1 deletion ledger/participant-state/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ da_scala_library(
"//libs-scala/contextualized-logging",
"//libs-scala/grpc-utils",
"//libs-scala/logging-entries",
"//observability/telemetry",
"//observability/tracing",
"@maven//:com_google_api_grpc_proto_google_common_protos",
"@maven//:com_google_protobuf_protobuf_java",
],
Expand Down
Loading

0 comments on commit f370124

Please sign in to comment.