diff --git a/bazel-java-deps.bzl b/bazel-java-deps.bzl index 70a537984737..60d492510620 100644 --- a/bazel-java-deps.bzl +++ b/bazel-java-deps.bzl @@ -141,8 +141,6 @@ def install_java_deps(): # ---- end of grpc-protobuf-netty block "io.reactivex.rxjava2:rxjava:2.2.1", "io.spray:spray-json_{}:1.3.5".format(scala_major_version), - "io.zipkin.brave:brave:4.6.0", - "io.zipkin.reporter:zipkin-sender-okhttp3:1.0.4", "javax.annotation:javax.annotation-api:1.2", "javax.ws.rs:javax.ws.rs-api:2.1", "junit:junit:4.12", diff --git a/daml-script/export/src/test/scala/com/daml/script/export/TestData.scala b/daml-script/export/src/test/scala/com/daml/script/export/TestData.scala index ecec24f5417a..90cdeedb81cc 100644 --- a/daml-script/export/src/test/scala/com/daml/script/export/TestData.scala +++ b/daml-script/export/src/test/scala/com/daml/script/export/TestData.scala @@ -125,7 +125,6 @@ object TestData { offset = "", eventsById = eventsById, rootEventIds = rootEventIds, - traceContext = None, ) } def toCommands: (Seq[Command], TransactionTree) = { diff --git a/language-support/hs/bindings/src/DA/Ledger/GrpcWrapUtils.hs b/language-support/hs/bindings/src/DA/Ledger/GrpcWrapUtils.hs index 07d0fda23faa..81fc9d1deb05 100644 --- a/language-support/hs/bindings/src/DA/Ledger/GrpcWrapUtils.hs +++ b/language-support/hs/bindings/src/DA/Ledger/GrpcWrapUtils.hs @@ -5,14 +5,12 @@ {-# LANGUAGE GADTs #-} module DA.Ledger.GrpcWrapUtils ( - noTrace, unwrap, unwrapWithNotFound, unwrapWithInvalidArgument, sendToStream, ) where import Prelude hiding (fail) -import Com.Daml.Ledger.Api.V1.TraceContext (TraceContext) import Control.Exception (throwIO) import Control.Monad.Fail (fail) import Control.Monad.Fix (fix) @@ -21,9 +19,6 @@ import DA.Ledger.Convert (Perhaps,runRaise) import Network.GRPC.HighLevel (clientCallCancel) import Network.GRPC.HighLevel.Generated -noTrace :: Maybe TraceContext -noTrace = Nothing - unwrap :: ClientResult 'Normal a -> IO a unwrap = \case ClientNormalResponse x _m1 _m2 _status _details -> return x diff --git a/language-support/hs/bindings/src/DA/Ledger/Services/ActiveContractsService.hs b/language-support/hs/bindings/src/DA/Ledger/Services/ActiveContractsService.hs index 2229a6b9b62a..2e80d4b95bd3 100644 --- a/language-support/hs/bindings/src/DA/Ledger/Services/ActiveContractsService.hs +++ b/language-support/hs/bindings/src/DA/Ledger/Services/ActiveContractsService.hs @@ -33,5 +33,4 @@ mkRequest lid tf verbosity = GetActiveContractsRequest { getActiveContractsRequestLedgerId = unLedgerId lid , getActiveContractsRequestFilter = Just tf , getActiveContractsRequestVerbose = unVerbosity verbosity - , getActiveContractsRequestTraceContext = noTrace } diff --git a/language-support/hs/bindings/src/DA/Ledger/Services/CommandCompletionService.hs b/language-support/hs/bindings/src/DA/Ledger/Services/CommandCompletionService.hs index 4fa8d1592eae..439ebafc73e9 100644 --- a/language-support/hs/bindings/src/DA/Ledger/Services/CommandCompletionService.hs +++ b/language-support/hs/bindings/src/DA/Ledger/Services/CommandCompletionService.hs @@ -50,7 +50,7 @@ completionEnd lid = withGRPCClient config $ \client -> do service <- commandCompletionServiceClient client let CommandCompletionService {commandCompletionServiceCompletionEnd=rpc} = service - let request = CompletionEndRequest (unLedgerId lid) noTrace + let request = CompletionEndRequest (unLedgerId lid) rpc (ClientNormalRequest request timeout mdm) >>= unwrap >>= \case diff --git a/language-support/hs/bindings/src/DA/Ledger/Services/CommandService.hs b/language-support/hs/bindings/src/DA/Ledger/Services/CommandService.hs index 962f5e66fbe8..8523b656fadc 100644 --- a/language-support/hs/bindings/src/DA/Ledger/Services/CommandService.hs +++ b/language-support/hs/bindings/src/DA/Ledger/Services/CommandService.hs @@ -24,7 +24,7 @@ submitAndWait commands = withGRPCClient config $ \client -> do service <- LL.commandServiceClient client let LL.CommandService{commandServiceSubmitAndWaitForTransactionId=rpc} = service - let request = LL.SubmitAndWaitRequest (Just (lowerCommands commands)) noTrace + let request = LL.SubmitAndWaitRequest (Just (lowerCommands commands)) rpc (ClientNormalRequest request timeout mdm) >>= unwrapWithInvalidArgument <&> fmap (\LL.SubmitAndWaitForTransactionIdResponse{} -> ()) @@ -35,7 +35,7 @@ submitAndWaitForTransactionId commands = withGRPCClient config $ \client -> do service <- LL.commandServiceClient client let LL.CommandService{commandServiceSubmitAndWaitForTransactionId=rpc} = service - let request = LL.SubmitAndWaitRequest (Just (lowerCommands commands)) noTrace + let request = LL.SubmitAndWaitRequest (Just (lowerCommands commands)) rpc (ClientNormalRequest request timeout mdm) >>= unwrapWithInvalidArgument <&> fmap (TransactionId . LL.submitAndWaitForTransactionIdResponseTransactionId) @@ -46,7 +46,7 @@ submitAndWaitForTransaction commands = withGRPCClient config $ \client -> do service <- LL.commandServiceClient client let LL.CommandService{commandServiceSubmitAndWaitForTransaction=rpc} = service - let request = LL.SubmitAndWaitRequest (Just (lowerCommands commands)) noTrace + let request = LL.SubmitAndWaitRequest (Just (lowerCommands commands)) rpc (ClientNormalRequest request timeout mdm) >>= unwrapWithInvalidArgument >>= \case @@ -66,7 +66,7 @@ submitAndWaitForTransactionTree commands = withGRPCClient config $ \client -> do service <- LL.commandServiceClient client let LL.CommandService{commandServiceSubmitAndWaitForTransactionTree=rpc} = service - let request = LL.SubmitAndWaitRequest (Just (lowerCommands commands)) noTrace + let request = LL.SubmitAndWaitRequest (Just (lowerCommands commands)) rpc (ClientNormalRequest request timeout mdm) >>= unwrapWithInvalidArgument >>= \case diff --git a/language-support/hs/bindings/src/DA/Ledger/Services/CommandSubmissionService.hs b/language-support/hs/bindings/src/DA/Ledger/Services/CommandSubmissionService.hs index 91ef0525a152..3adc70988ff2 100644 --- a/language-support/hs/bindings/src/DA/Ledger/Services/CommandSubmissionService.hs +++ b/language-support/hs/bindings/src/DA/Ledger/Services/CommandSubmissionService.hs @@ -20,7 +20,7 @@ submit commands = withGRPCClient config $ \client -> do service <- commandSubmissionServiceClient client let CommandSubmissionService rpc = service - let request = SubmitRequest (Just (lowerCommands commands)) noTrace + let request = SubmitRequest (Just (lowerCommands commands)) rpc (ClientNormalRequest request timeout mdm) >>= unwrapWithInvalidArgument <&> fmap (\Empty{} -> ()) diff --git a/language-support/hs/bindings/src/DA/Ledger/Services/LedgerConfigurationService.hs b/language-support/hs/bindings/src/DA/Ledger/Services/LedgerConfigurationService.hs index 0b88243f2f82..974f5d66f926 100644 --- a/language-support/hs/bindings/src/DA/Ledger/Services/LedgerConfigurationService.hs +++ b/language-support/hs/bindings/src/DA/Ledger/Services/LedgerConfigurationService.hs @@ -16,7 +16,7 @@ import qualified Com.Daml.Ledger.Api.V1.LedgerConfigurationService as LL getLedgerConfiguration :: LedgerId -> LedgerService (Stream LedgerConfiguration) getLedgerConfiguration lid = makeLedgerService $ \timeout config mdm -> do - let request = LL.GetLedgerConfigurationRequest (unLedgerId lid) noTrace + let request = LL.GetLedgerConfigurationRequest (unLedgerId lid) asyncStreamGen $ \stream -> withGRPCClient config $ \client -> do service <- LL.ledgerConfigurationServiceClient client diff --git a/language-support/hs/bindings/src/DA/Ledger/Services/LedgerIdentityService.hs b/language-support/hs/bindings/src/DA/Ledger/Services/LedgerIdentityService.hs index dd11bd776e97..eb167ee44d64 100644 --- a/language-support/hs/bindings/src/DA/Ledger/Services/LedgerIdentityService.hs +++ b/language-support/hs/bindings/src/DA/Ledger/Services/LedgerIdentityService.hs @@ -12,7 +12,7 @@ import Network.GRPC.HighLevel.Generated getLedgerIdentity :: LedgerService LedgerId getLedgerIdentity = makeLedgerService $ \timeout config mdm -> do - let request = GetLedgerIdentityRequest noTrace + let request = GetLedgerIdentityRequest withGRPCClient config $ \client -> do service <- ledgerIdentityServiceClient client let LedgerIdentityService{ledgerIdentityServiceGetLedgerIdentity=rpc} = service diff --git a/language-support/hs/bindings/src/DA/Ledger/Services/PackageService.hs b/language-support/hs/bindings/src/DA/Ledger/Services/PackageService.hs index 8de42989538e..70d8083a540e 100644 --- a/language-support/hs/bindings/src/DA/Ledger/Services/PackageService.hs +++ b/language-support/hs/bindings/src/DA/Ledger/Services/PackageService.hs @@ -24,7 +24,7 @@ listPackages lid = withGRPCClient config $ \client -> do service <- packageServiceClient client let PackageService {packageServiceListPackages=rpc} = service - let request = ListPackagesRequest (unLedgerId lid) noTrace + let request = ListPackagesRequest (unLedgerId lid) response <- rpc (ClientNormalRequest request timeout mdm) ListPackagesResponse xs <- unwrap response return $ map PackageId $ Vector.toList xs @@ -37,7 +37,7 @@ getPackage lid pid = withGRPCClient config $ \client -> do service <- packageServiceClient client let PackageService {packageServiceGetPackage=rpc} = service - let request = GetPackageRequest (unLedgerId lid) (unPackageId pid) noTrace + let request = GetPackageRequest (unLedgerId lid) (unPackageId pid) rpc (ClientNormalRequest request timeout mdm) >>= unwrapWithNotFound >>= \case @@ -52,7 +52,7 @@ getPackageStatus lid pid = withGRPCClient config $ \client -> do service <- packageServiceClient client let PackageService {packageServiceGetPackageStatus=rpc} = service - let request = GetPackageStatusRequest (unLedgerId lid) (unPackageId pid) noTrace + let request = GetPackageStatusRequest (unLedgerId lid) (unPackageId pid) rpc (ClientNormalRequest request timeout mdm) >>= unwrap >>= \case diff --git a/language-support/hs/bindings/src/DA/Ledger/Services/TransactionService.hs b/language-support/hs/bindings/src/DA/Ledger/Services/TransactionService.hs index 137ef475b715..f5f23eb86e8a 100644 --- a/language-support/hs/bindings/src/DA/Ledger/Services/TransactionService.hs +++ b/language-support/hs/bindings/src/DA/Ledger/Services/TransactionService.hs @@ -123,7 +123,7 @@ ledgerEnd lid = withGRPCClient config $ \client -> do service <- LL.transactionServiceClient client let LL.TransactionService{transactionServiceGetLedgerEnd=rpc} = service - let request = LL.GetLedgerEndRequest (unLedgerId lid) noTrace + let request = LL.GetLedgerEndRequest (unLedgerId lid) rpc (ClientNormalRequest request timeout mdm) >>= unwrap >>= \case @@ -157,8 +157,7 @@ lowerRequest = \case getTransactionsRequestBegin = Just (lowerLedgerOffset begin), getTransactionsRequestEnd = fmap lowerLedgerOffset end, getTransactionsRequestFilter = Just filter, - getTransactionsRequestVerbose = unVerbosity verbose, - getTransactionsRequestTraceContext = noTrace + getTransactionsRequestVerbose = unVerbosity verbose } mkByEventIdRequest :: LedgerId -> EventId -> [Party] -> LL.GetTransactionByEventIdRequest @@ -167,7 +166,6 @@ mkByEventIdRequest lid eid parties = (unLedgerId lid) (unEventId eid) (Vector.fromList $ map unParty parties) - noTrace mkByIdRequest :: LedgerId -> TransactionId -> [Party] -> LL.GetTransactionByIdRequest mkByIdRequest lid trid parties = @@ -175,4 +173,3 @@ mkByIdRequest lid trid parties = (unLedgerId lid) (unTransactionId trid) (Vector.fromList $ map unParty parties) - noTrace diff --git a/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/components/BotTest.scala b/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/components/BotTest.scala index a342d737ceca..7791359f1347 100644 --- a/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/components/BotTest.scala +++ b/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/components/BotTest.scala @@ -480,7 +480,6 @@ final class BotTest extends AnyFlatSpec with Matchers with Eventually { com.google.protobuf.timestamp.Timestamp.defaultInstance, Seq(), offset, - None, ) val getTransactionsResponses = Observable.defer[TransactionsServiceImpl.LedgerItem](() => Observable.fromArray( diff --git a/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/CommandCompletionClientImplTest.scala b/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/CommandCompletionClientImplTest.scala index cba79687384d..84444edcc634 100644 --- a/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/CommandCompletionClientImplTest.scala +++ b/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/CommandCompletionClientImplTest.scala @@ -60,8 +60,8 @@ class CommandCompletionClientImplTest it should "return a stream with all the completions" in { val applicationId = "applicationId" - val completion1 = Completion("cid1", Option(new Status(0)), "1", None) - val completion2 = Completion("cid2", Option(new Status(1)), traceContext = None) + val completion1 = Completion("cid1", Option(new Status(0)), "1") + val completion2 = Completion("cid2", Option(new Status(1))) val completionResponse = CompletionStreamResponse(None, List(completion1, completion2)) ledgerServices.withCommandCompletionClient( List(completionResponse), @@ -90,7 +90,7 @@ class CommandCompletionClientImplTest it should "send the request with the correct ledgerId" in { val applicationId = "applicationId" - val completion1 = Completion("cid1", Option(new Status(0)), traceContext = None) + val completion1 = Completion("cid1", Option(new Status(0))) val completionResponse = CompletionStreamResponse(None, List(completion1)) val parties = Set("Alice") ledgerServices.withCommandCompletionClient( @@ -113,7 +113,7 @@ class CommandCompletionClientImplTest behavior of "Authorization" def toAuthenticatedServer(fn: CommandCompletionClient => Any): Any = { - val completion1 = Completion("cid1", Option(new Status(0)), traceContext = None) + val completion1 = Completion("cid1", Option(new Status(0))) val completionResponse = CompletionStreamResponse(None, List(completion1)) ledgerServices.withCommandCompletionClient( List(completionResponse), diff --git a/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/DataLayerHelpers.scala b/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/DataLayerHelpers.scala index 674420209dbb..6752866a3284 100644 --- a/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/DataLayerHelpers.scala +++ b/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/DataLayerHelpers.scala @@ -25,7 +25,6 @@ trait DataLayerHelpers { "", "workflowId", Seq[CreatedEvent](), - None, ) } diff --git a/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/TransactionGenerator.scala b/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/TransactionGenerator.scala index 214520f6bc67..edf82e6fecf6 100644 --- a/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/TransactionGenerator.scala +++ b/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/TransactionGenerator.scala @@ -281,7 +281,7 @@ object TransactionGenerator { (scalaEvents, javaEvents) <- eventsGen offset <- Gen.numStr } yield ( - LedgerItem(transactionId, commandId, workflowId, scalaTimestamp, scalaEvents, offset, None), + LedgerItem(transactionId, commandId, workflowId, scalaTimestamp, scalaEvents, offset), new data.Transaction(transactionId, commandId, workflowId, javaTimestamp, javaEvents, offset), ) @@ -293,7 +293,7 @@ object TransactionGenerator { (scalaEvents, javaEvents) <- eventsGen offset <- Gen.numStr } yield ( - LedgerItem(transactionId, commandId, workflowId, scalaTimestamp, scalaEvents, offset, None), + LedgerItem(transactionId, commandId, workflowId, scalaTimestamp, scalaEvents, offset), new data.TransactionTree( transactionId, commandId, diff --git a/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/TransactionsServiceImpl.scala b/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/TransactionsServiceImpl.scala index 65049e676f6c..a8b8ca95cafb 100644 --- a/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/TransactionsServiceImpl.scala +++ b/language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/TransactionsServiceImpl.scala @@ -20,7 +20,6 @@ import com.daml.ledger.api.v1.ledger_offset.LedgerOffset.LedgerBoundary.{ Unrecognized, } import com.daml.ledger.api.v1.ledger_offset.LedgerOffset.Value.{Absolute, Boundary} -import com.daml.ledger.api.v1.trace_context.TraceContext import com.daml.ledger.api.v1.transaction.Transaction import com.daml.ledger.api.v1.transaction_service.TransactionServiceGrpc.TransactionService import com.daml.ledger.api.v1.transaction_service._ @@ -132,7 +131,6 @@ object TransactionsServiceImpl { effectiveAt: Timestamp, events: Seq[Event], offset: String, - traceContext: Option[TraceContext], ) { def toTransaction = @@ -143,7 +141,6 @@ object TransactionsServiceImpl { Some(effectiveAt), events, offset, - traceContext, ) } diff --git a/language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/DomainTransaction.scala b/language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/DomainTransaction.scala index 131cca590dd6..77a9b06261b0 100644 --- a/language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/DomainTransaction.scala +++ b/language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/DomainTransaction.scala @@ -5,7 +5,6 @@ package com.daml.ledger.client.binding import com.daml.ledger.api.refinements.ApiTypes.{CommandId, TransactionId, WorkflowId} import com.daml.ledger.api.v1.ledger_offset.LedgerOffset -import com.daml.ledger.api.v1.trace_context.TraceContext import com.google.protobuf.timestamp.Timestamp case class DomainTransaction( @@ -15,5 +14,4 @@ case class DomainTransaction( commandId: CommandId, effectiveAt: Timestamp, events: Seq[DomainEvent], - traceContext: Option[TraceContext], ) diff --git a/language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/DomainTransactionMapper.scala b/language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/DomainTransactionMapper.scala index 8618a2bf08e3..85674a2104cb 100644 --- a/language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/DomainTransactionMapper.scala +++ b/language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/DomainTransactionMapper.scala @@ -65,7 +65,6 @@ class DomainTransactionMapper(decoder: DecoderType) extends LazyLogging { commandId, effectiveAt, events, - t.traceContext, ) private def checkExists[T]( diff --git a/language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/retrying/CommandRetryFlow.scala b/language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/retrying/CommandRetryFlow.scala index 78a18323cfd5..f624fd43c9c3 100644 --- a/language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/retrying/CommandRetryFlow.scala +++ b/language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/retrying/CommandRetryFlow.scala @@ -70,7 +70,7 @@ object CommandRetryFlow { { case Ctx( RetryInfo(request, nrOfRetries, firstSubmissionTime, _), - Completion(_, Some(status: Status), _, _), + Completion(_, Some(status: Status), _), _, ) => if (status.code == Code.OK_VALUE) { @@ -87,7 +87,7 @@ object CommandRetryFlow { RetryLogger.logFatal(request, status, nrOfRetries) PROPAGATE_PORT } - case Ctx(_, Completion(commandId, _, _, _), _) => + case Ctx(_, Completion(commandId, _, _), _) => statusNotFoundError(commandId) }, ) diff --git a/language-support/scala/bindings-akka/src/test/scala/com/digitalasset/ledger/client/binding/DomainTransactionMapperUT.scala b/language-support/scala/bindings-akka/src/test/scala/com/digitalasset/ledger/client/binding/DomainTransactionMapperUT.scala index e330b7091c06..c52ea4be7118 100644 --- a/language-support/scala/bindings-akka/src/test/scala/com/digitalasset/ledger/client/binding/DomainTransactionMapperUT.scala +++ b/language-support/scala/bindings-akka/src/test/scala/com/digitalasset/ledger/client/binding/DomainTransactionMapperUT.scala @@ -99,7 +99,6 @@ class DomainTransactionMapperUT extends AnyWordSpec with Matchers with AkkaTest CommandId("cid"), time, events, - None, ) "DomainTransactionMapper" should { diff --git a/language-support/scala/bindings-akka/src/test/scala/com/digitalasset/ledger/client/binding/retrying/CommandRetryFlowUT.scala b/language-support/scala/bindings-akka/src/test/scala/com/digitalasset/ledger/client/binding/retrying/CommandRetryFlowUT.scala index b959ac29a0c6..f0a6437c1a53 100644 --- a/language-support/scala/bindings-akka/src/test/scala/com/digitalasset/ledger/client/binding/retrying/CommandRetryFlowUT.scala +++ b/language-support/scala/bindings-akka/src/test/scala/com/digitalasset/ledger/client/binding/retrying/CommandRetryFlowUT.scala @@ -30,16 +30,15 @@ class CommandRetryFlowUT extends AsyncWordSpec with Matchers with AkkaTest { val mockCommandSubmission: SubmissionFlowType[RetryInfo[Status]] = Flow[In[RetryInfo[Status]]] .map { - case Ctx(context @ RetryInfo(_, _, _, status), SubmitRequest(Some(commands), tc), _) => + case Ctx(context @ RetryInfo(_, _, _, status), SubmitRequest(Some(commands)), _) => if (commands.deduplicationTime.get.nanos == 0) { - Ctx(context, Completion(commands.commandId, Some(status), traceContext = tc)) + Ctx(context, Completion(commands.commandId, Some(status))) } else { Ctx( context, Completion( commands.commandId, Some(status.copy(code = Code.OK_VALUE)), - traceContext = tc, ), ) } @@ -74,8 +73,7 @@ class CommandRetryFlowUT extends AsyncWordSpec with Matchers with AkkaTest { Seq.empty, Some(protoDuration.of(120, 0)), ) - ), - None, + ) ) val input = diff --git a/language-support/scala/bindings/src/main/scala/com/digitalasset/ledger/api/refinements/CompositeCommand.scala b/language-support/scala/bindings/src/main/scala/com/digitalasset/ledger/api/refinements/CompositeCommand.scala index f6a25a967eff..d440b90c362c 100644 --- a/language-support/scala/bindings/src/main/scala/com/digitalasset/ledger/api/refinements/CompositeCommand.scala +++ b/language-support/scala/bindings/src/main/scala/com/digitalasset/ledger/api/refinements/CompositeCommand.scala @@ -5,12 +5,10 @@ package com.daml.ledger.api.refinements import com.daml.ledger.api.refinements.ApiTypes.{CommandId, Party, WorkflowId} import com.daml.ledger.api.v1.commands.Command -import com.daml.ledger.api.v1.trace_context.TraceContext final case class CompositeCommand( commands: Seq[Command], party: Party, commandId: CommandId, workflowId: WorkflowId, - traceContext: Option[TraceContext], ) diff --git a/language-support/scala/bindings/src/main/scala/com/digitalasset/ledger/api/refinements/CompositeCommandAdapter.scala b/language-support/scala/bindings/src/main/scala/com/digitalasset/ledger/api/refinements/CompositeCommandAdapter.scala index c99d7a6af7b2..35a30bb7d200 100644 --- a/language-support/scala/bindings/src/main/scala/com/digitalasset/ledger/api/refinements/CompositeCommandAdapter.scala +++ b/language-support/scala/bindings/src/main/scala/com/digitalasset/ledger/api/refinements/CompositeCommandAdapter.scala @@ -23,7 +23,7 @@ class CompositeCommandAdapter( c.commands, ) - SubmitRequest(Some(commands), c.traceContext) + SubmitRequest(Some(commands)) } } diff --git a/language-support/scala/bindings/src/test/scala/com/digitalasset/ledger/api/refinements/CompositeCommandAdapterUT.scala b/language-support/scala/bindings/src/test/scala/com/digitalasset/ledger/api/refinements/CompositeCommandAdapterUT.scala index 9349a0a81dba..9af0a3281f5d 100644 --- a/language-support/scala/bindings/src/test/scala/com/digitalasset/ledger/api/refinements/CompositeCommandAdapterUT.scala +++ b/language-support/scala/bindings/src/test/scala/com/digitalasset/ledger/api/refinements/CompositeCommandAdapterUT.scala @@ -6,7 +6,6 @@ package com.daml.ledger.api.refinements import com.daml.ledger.api.refinements.ApiTypes._ import com.daml.ledger.api.v1.commands.Command.Command.Create import com.daml.ledger.api.v1.commands.{Command, Commands, CreateCommand} -import com.daml.ledger.api.v1.trace_context.TraceContext import com.daml.ledger.api.v1.value.Identifier import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec @@ -23,13 +22,11 @@ class CompositeCommandAdapterUT extends AnyWordSpec with Matchers { ) ) - val submittedTraceContext = Some(TraceContext(1, 2, 3, Some(4L), true)) val compositeCommand = CompositeCommand( commands, Party("party"), CommandId("commandId"), WorkflowId("workflowId"), - submittedTraceContext, ) val submitRequest = CompositeCommandAdapter( @@ -40,8 +37,6 @@ class CompositeCommandAdapterUT extends AnyWordSpec with Matchers { submitRequest.commands shouldBe Some( Commands("ledgerId", "workflowId", "applicationId", "commandId", "party", commands) ) - - submitRequest.traceContext shouldBe submittedTraceContext } } diff --git a/language-support/scala/codegen-sample-app/src/test/scala/com/digitalasset/codegen/ScalaCodeGenIT.scala b/language-support/scala/codegen-sample-app/src/test/scala/com/digitalasset/codegen/ScalaCodeGenIT.scala index 50b926e04460..1cf5a453542f 100644 --- a/language-support/scala/codegen-sample-app/src/test/scala/com/digitalasset/codegen/ScalaCodeGenIT.scala +++ b/language-support/scala/codegen-sample-app/src/test/scala/com/digitalasset/codegen/ScalaCodeGenIT.scala @@ -17,7 +17,6 @@ import com.daml.ledger.api.v1.commands.Commands import com.daml.ledger.api.v1.event.Event import com.daml.ledger.api.v1.ledger_offset.LedgerOffset import com.daml.ledger.api.v1.package_service.ListPackagesResponse -import com.daml.ledger.api.v1.trace_context.TraceContext import com.daml.ledger.api.v1.transaction.Transaction import com.daml.ledger.api.v1.transaction_filter.{Filters, TransactionFilter} import com.daml.ledger.client.LedgerClient @@ -71,7 +70,6 @@ class ScalaCodeGenIT private val ledgerId = this.getClass.getSimpleName private val applicationId = ledgerId + "-client" private val decoder: DecoderType = EventDecoder.createdEventToContractRef - private val traceContext = TraceContext(1L, 2L, 3L, Some(4L)) private val alice = P.Party("Alice") private val bob = P.Party("Bob") @@ -462,7 +460,7 @@ class ScalaCodeGenIT party = P.Party.unwrap(party), commands = seq.map(_.command), ) - SubmitRequest(Some(commands), Some(traceContext)) + SubmitRequest(Some(commands)) } private def send[A](context: A, requests: SubmitRequest*)( diff --git a/language-support/scala/examples/iou-no-codegen/application/src/main/scala/com/digitalasset/quickstart/iou/ClientUtil.scala b/language-support/scala/examples/iou-no-codegen/application/src/main/scala/com/digitalasset/quickstart/iou/ClientUtil.scala index 4e07ed7ca8b9..3b9441636625 100644 --- a/language-support/scala/examples/iou-no-codegen/application/src/main/scala/com/digitalasset/quickstart/iou/ClientUtil.scala +++ b/language-support/scala/examples/iou-no-codegen/application/src/main/scala/com/digitalasset/quickstart/iou/ClientUtil.scala @@ -48,7 +48,7 @@ class ClientUtil( commands = Seq(Command(cmd)), ) - commandClient.submitSingleCommand(SubmitRequest(Some(commands), None)) + commandClient.submitSingleCommand(SubmitRequest(Some(commands))) } def nextTransaction(party: String, offset: LedgerOffset)(implicit diff --git a/language-support/scala/examples/quickstart-scala/application/src/main/scala/com/digitalasset/quickstart/iou/ClientUtil.scala b/language-support/scala/examples/quickstart-scala/application/src/main/scala/com/digitalasset/quickstart/iou/ClientUtil.scala index c07521f9c8b0..94eeb85dd74d 100644 --- a/language-support/scala/examples/quickstart-scala/application/src/main/scala/com/digitalasset/quickstart/iou/ClientUtil.scala +++ b/language-support/scala/examples/quickstart-scala/application/src/main/scala/com/digitalasset/quickstart/iou/ClientUtil.scala @@ -57,7 +57,7 @@ class ClientUtil( party = P.Party.unwrap(party), commands = seq.map(_.command), ) - SubmitRequest(Some(commands), None) + SubmitRequest(Some(commands)) } def nextTransaction(party: P.Party, offset: LedgerOffset)(implicit diff --git a/ledger-api/grpc-definitions/BUILD.bazel b/ledger-api/grpc-definitions/BUILD.bazel index 2475c315916c..86e0a9bba4f2 100644 --- a/ledger-api/grpc-definitions/BUILD.bazel +++ b/ledger-api/grpc-definitions/BUILD.bazel @@ -106,7 +106,6 @@ ledger_api_haskellpb_sources = [ "LedgerIdentityService.hs", "LedgerOffset.hs", "PackageService.hs", - "TraceContext.hs", "Transaction.hs", "TransactionFilter.hs", "TransactionService.hs", diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/active_contracts_service.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/active_contracts_service.proto index 1201cc84e1c0..8fdcafb3fec0 100644 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/active_contracts_service.proto +++ b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/active_contracts_service.proto @@ -7,8 +7,6 @@ package com.daml.ledger.api.v1; import "com/daml/ledger/api/v1/event.proto"; import "com/daml/ledger/api/v1/transaction_filter.proto"; -import "com/daml/ledger/api/v1/trace_context.proto"; - option java_outer_classname = "ActiveContractsServiceOuterClass"; option java_package = "com.daml.ledger.api.v1"; @@ -45,12 +43,6 @@ message GetActiveContractsRequest { // In particular, setting the verbose flag to true triggers the ledger to include labels for record fields. // Optional bool verbose = 3; - - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; - } message GetActiveContractsResponse { @@ -70,10 +62,4 @@ message GetActiveContractsResponse { // Must be a valid LedgerString (as described in ``value.proto``). // Optional repeated CreatedEvent active_contracts = 3; - - // Zipkin trace context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; - } diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/command_completion_service.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/command_completion_service.proto index 995ac336aadb..1caad2eafec6 100644 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/command_completion_service.proto +++ b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/command_completion_service.proto @@ -7,11 +7,8 @@ package com.daml.ledger.api.v1; import "com/daml/ledger/api/v1/completion.proto"; import "com/daml/ledger/api/v1/ledger_offset.proto"; -import "com/daml/ledger/api/v1/trace_context.proto"; - import "google/protobuf/timestamp.proto"; - option java_outer_classname = "CommandCompletionServiceOuterClass"; option java_package = "com.daml.ledger.api.v1"; option csharp_namespace = "Com.Daml.Ledger.Api.V1"; @@ -29,9 +26,6 @@ option csharp_namespace = "Com.Daml.Ledger.Api.V1"; // // Clients that do not receive a successful completion about their submission MUST NOT assume that it was successful. // Clients SHOULD subscribe to the CompletionStream before starting to submit commands to prevent race conditions. -// -// Interprocess tracing of command submissions may be achieved via Zipkin by filling out the ``trace_context`` field. -// The server will return a child context of the submitted one, (or a new one if the context was missing) on both the Completion and Transaction streams. service CommandCompletionService { // Subscribe to command completion events. @@ -109,11 +103,6 @@ message CompletionEndRequest { // Must be a valid LedgerString (as described in ``value.proto``). // Required string ledger_id = 1; - - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; } message CompletionEndResponse { diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/command_service.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/command_service.proto index 0b7c3dd7f536..3db0bfe80f80 100644 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/command_service.proto +++ b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/command_service.proto @@ -6,9 +6,7 @@ syntax = "proto3"; package com.daml.ledger.api.v1; import "com/daml/ledger/api/v1/commands.proto"; -import "com/daml/ledger/api/v1/trace_context.proto"; import "com/daml/ledger/api/v1/transaction.proto"; - import "google/protobuf/empty.proto"; option java_outer_classname = "CommandServiceOuterClass"; @@ -70,16 +68,9 @@ service CommandService { // These commands are atomic, and will become transactions. message SubmitAndWaitRequest { - // The commands to be submitted. // Required Commands commands = 1; - - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; - } message SubmitAndWaitForTransactionIdResponse { @@ -90,13 +81,13 @@ message SubmitAndWaitForTransactionIdResponse { } message SubmitAndWaitForTransactionResponse { - // The flat transaction that resulted from the submitted command. - // Required - Transaction transaction = 1; + // The flat transaction that resulted from the submitted command. + // Required + Transaction transaction = 1; } message SubmitAndWaitForTransactionTreeResponse { - // The transaction tree that resulted from the submitted command. - // Required - TransactionTree transaction = 1; -} \ No newline at end of file + // The transaction tree that resulted from the submitted command. + // Required + TransactionTree transaction = 1; +} diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/command_submission_service.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/command_submission_service.proto index ed507b37c87a..d2f6342d1226 100644 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/command_submission_service.proto +++ b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/command_submission_service.proto @@ -5,12 +5,9 @@ syntax = "proto3"; package com.daml.ledger.api.v1; -import "com/daml/ledger/api/v1/trace_context.proto"; import "com/daml/ledger/api/v1/commands.proto"; - import "google/protobuf/empty.proto"; - option java_outer_classname = "CommandSubmissionServiceOuterClass"; option java_package = "com.daml.ledger.api.v1"; option csharp_namespace = "Com.Daml.Ledger.Api.V1"; @@ -28,9 +25,6 @@ option csharp_namespace = "Com.Daml.Ledger.Api.V1"; // // Clients that do not receive a successful completion about their submission MUST NOT assume that it was successful. // Clients SHOULD subscribe to the CompletionStream before starting to submit commands to prevent race conditions. -// -// Interprocess tracing of command submissions may be achieved via Zipkin by filling out the ``trace_context`` field. -// The server will return a child context of the submitted one, (or a new one if the context was missing) on both the Completion and Transaction streams. service CommandSubmissionService { // Submit a single composite command. @@ -53,8 +47,4 @@ message SubmitRequest { // Required Commands commands = 1; - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; } diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/completion.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/completion.proto index d3c2b3d38e9e..65fe3a101ca1 100644 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/completion.proto +++ b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/completion.proto @@ -5,10 +5,8 @@ syntax = "proto3"; package com.daml.ledger.api.v1; -import "com/daml/ledger/api/v1/trace_context.proto"; import "google/rpc/status.proto"; - option java_outer_classname = "CompletionOuterClass"; option java_package = "com.daml.ledger.api.v1"; option csharp_namespace = "Com.Daml.Ledger.Api.V1"; @@ -31,9 +29,4 @@ message Completion { // Must be a valid LedgerString (as described in ``value.proto``). // Optional string transaction_id = 3; - - // The trace context submitted with the command. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; } diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/ledger_configuration_service.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/ledger_configuration_service.proto index b4b842c9d2a9..cd2ad38c5376 100644 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/ledger_configuration_service.proto +++ b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/ledger_configuration_service.proto @@ -5,10 +5,8 @@ syntax = "proto3"; package com.daml.ledger.api.v1; -import "com/daml/ledger/api/v1/trace_context.proto"; import "google/protobuf/duration.proto"; - option java_outer_classname = "LedgerConfigurationServiceOuterClass"; option java_package = "com.daml.ledger.api.v1"; option csharp_namespace = "Com.Daml.Ledger.Api.V1"; @@ -31,11 +29,6 @@ message GetLedgerConfigurationRequest { // Must be a valid LedgerString (as described in ``value.proto``). // Required string ledger_id = 1; - - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; } message GetLedgerConfigurationResponse { diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/ledger_identity_service.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/ledger_identity_service.proto index 826b0ef6a08f..b9dc47cd95b9 100644 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/ledger_identity_service.proto +++ b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/ledger_identity_service.proto @@ -5,9 +5,6 @@ syntax = "proto3"; package com.daml.ledger.api.v1; -import "com/daml/ledger/api/v1/trace_context.proto"; - - option java_outer_classname = "LedgerIdentityServiceOuterClass"; option java_package = "com.daml.ledger.api.v1"; option csharp_namespace = "Com.Daml.Ledger.Api.V1"; @@ -24,13 +21,7 @@ service LedgerIdentityService { } -message GetLedgerIdentityRequest { - - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; -} +message GetLedgerIdentityRequest {} message GetLedgerIdentityResponse { diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/package_service.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/package_service.proto index 393fb204b5fe..2c96a9a3cdfe 100644 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/package_service.proto +++ b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/package_service.proto @@ -5,9 +5,6 @@ syntax = "proto3"; package com.daml.ledger.api.v1; -import "com/daml/ledger/api/v1/trace_context.proto"; - - option java_outer_classname = "PackageServiceOuterClass"; option java_package = "com.daml.ledger.api.v1"; option csharp_namespace = "Com.Daml.Ledger.Api.V1"; @@ -44,11 +41,6 @@ message ListPackagesRequest { // Must be a valid LedgerString (as described in ``value.proto``). // Required string ledger_id = 1; - - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; } message ListPackagesResponse { @@ -70,11 +62,6 @@ message GetPackageRequest { // Must be a valid PackageIdString (as described in ``value.proto``). // Required string package_id = 2; - - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; } message GetPackageResponse { @@ -104,11 +91,6 @@ message GetPackageStatusRequest { // Must be a valid PackageIdString (as described in ``value.proto``). // Required string package_id = 2; - - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; } message GetPackageStatusResponse { diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/trace_context.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/trace_context.proto deleted file mode 100644 index c72e1432484a..000000000000 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/trace_context.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 - -syntax = "proto3"; - -package com.daml.ledger.api.v1; - -import "google/protobuf/wrappers.proto"; - - -option java_outer_classname = "TraceContextOuterClass"; -option java_package = "com.daml.ledger.api.v1"; -option csharp_namespace = "Com.Daml.Ledger.Api.V1"; - -// Data structure to propagate Zipkin trace information. -// See https://github.com/openzipkin/b3-propagation -// Trace identifiers are 64 or 128-bit, but all span identifiers within a trace are 64-bit. All identifiers are opaque. -message TraceContext { - - // If present, this is the high 64 bits of the 128-bit identifier. Otherwise the trace ID is 64 bits long. - uint64 trace_id_high = 1 [jstype = JS_STRING]; - - // The TraceId is 64 or 128-bit in length and indicates the overall ID of the trace. Every span in a trace shares this ID. - uint64 trace_id = 2 [jstype = JS_STRING]; - - // The SpanId is 64-bit in length and indicates the position of the current operation in the trace tree. - // The value should not be interpreted: it may or may not be derived from the value of the TraceId. - uint64 span_id = 3 [jstype = JS_STRING]; - - // The ParentSpanId is 64-bit in length and indicates the position of the parent operation in the trace tree. - // When the span is the root of the trace tree, the ParentSpanId is absent. - google.protobuf.UInt64Value parent_span_id = 4; - - // When the sampled decision is accept, report this span to the tracing system. When it is reject, do not. - // When B3 attributes are sent without a sampled decision, the receiver should make one. - // Once the sampling decision is made, the same value should be consistently sent downstream. - bool sampled = 5; -} diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/transaction.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/transaction.proto index 924b05739f00..f37d215b3456 100644 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/transaction.proto +++ b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/transaction.proto @@ -6,11 +6,8 @@ syntax = "proto3"; package com.daml.ledger.api.v1; import "com/daml/ledger/api/v1/event.proto"; -import "com/daml/ledger/api/v1/trace_context.proto"; - import "google/protobuf/timestamp.proto"; - option java_outer_classname = "TransactionOuterClass"; option java_package = "com.daml.ledger.api.v1"; option csharp_namespace = "Com.Daml.Ledger.Api.V1"; @@ -55,11 +52,6 @@ message TransactionTree { // Required repeated string root_event_ids = 8; - // Zipkin trace context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; - } // Each tree event message type below contains a ``witness_parties`` field which @@ -108,9 +100,4 @@ message Transaction { // Required string offset = 6; - // Zipkin trace context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; - } diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/transaction_service.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/transaction_service.proto index 106fc65c8eb7..7885445f68d4 100644 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/transaction_service.proto +++ b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/transaction_service.proto @@ -8,8 +8,6 @@ package com.daml.ledger.api.v1; import "com/daml/ledger/api/v1/ledger_offset.proto"; import "com/daml/ledger/api/v1/transaction_filter.proto"; import "com/daml/ledger/api/v1/transaction.proto"; -import "com/daml/ledger/api/v1/trace_context.proto"; - option java_outer_classname = "TransactionServiceOuterClass"; option java_package = "com.daml.ledger.api.v1"; @@ -110,11 +108,6 @@ message GetTransactionsRequest { // Optional bool verbose = 5; - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; - } message GetTransactionsResponse { @@ -143,11 +136,6 @@ message GetTransactionByEventIdRequest { // Each element must be a valid PartyIdString (as described in ``value.proto``). // Required repeated string requesting_parties = 3; - - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; } message GetTransactionByIdRequest { @@ -166,11 +154,6 @@ message GetTransactionByIdRequest { // Each element be a valid PartyIdString (as describe in ``value.proto``). // Required repeated string requesting_parties = 3; - - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; } message GetTransactionResponse { @@ -186,11 +169,6 @@ message GetLedgerEndRequest { // Must be a valid LedgerString (as describe in ``value.proto``). // Required string ledger_id = 1; - - // Server side tracing will be registered as a child of the submitted context. - // This field is a future extension point and is currently not supported. - // Optional - TraceContext trace_context = 1000; } message GetLedgerEndResponse { diff --git a/ledger-api/testing-utils/src/main/scala/com/digitalasset/ledger/api/testing/utils/MockMessages.scala b/ledger-api/testing-utils/src/main/scala/com/digitalasset/ledger/api/testing/utils/MockMessages.scala index 61236ec23599..09735eb1e8e2 100644 --- a/ledger-api/testing-utils/src/main/scala/com/digitalasset/ledger/api/testing/utils/MockMessages.scala +++ b/ledger-api/testing-utils/src/main/scala/com/digitalasset/ledger/api/testing/utils/MockMessages.scala @@ -10,7 +10,6 @@ import com.daml.ledger.api.v1.event._ import com.daml.ledger.api.v1.ledger_offset.LedgerOffset import com.daml.ledger.api.v1.ledger_offset.LedgerOffset.LedgerBoundary.{LEDGER_BEGIN, LEDGER_END} import com.daml.ledger.api.v1.ledger_offset.LedgerOffset.Value.Boundary -import com.daml.ledger.api.v1.trace_context.TraceContext import com.daml.ledger.api.v1.transaction.{Transaction, TransactionTree, TreeEvent} import com.daml.ledger.api.v1.transaction_filter.{Filters, TransactionFilter} import com.daml.ledger.api.v1.value.Value.Sum.Text @@ -34,10 +33,9 @@ object MockMessages { val commands = Commands(ledgerId, workflowId, applicationId, commandId, party, Nil) - val submitRequest = SubmitRequest(Some(commands), None) + val submitRequest = SubmitRequest(Some(commands)) - val submitAndWaitRequest = - SubmitAndWaitRequest(Some(commands), Some(TraceContext(1L, 2L, 3L, Some(4L)))) + val submitAndWaitRequest = SubmitAndWaitRequest(Some(commands)) val moduleName = "moduleName" val transactionId = "transactionId" @@ -80,7 +78,6 @@ object MockMessages { createdEvent.eventId -> TreeEvent(TreeEvent.Kind.Created(createdEvent)), ), List(exercisedEvent.eventId), - None, ) val filteredTransaction = Transaction( @@ -90,7 +87,6 @@ object MockMessages { Some(ledgerEffectiveTime), List.empty, offset, - None, ) private val NO_OF_TRANSACTIONS = 1000 diff --git a/ledger-service/http-json/src/main/scala/com/digitalasset/http/ContractsService.scala b/ledger-service/http-json/src/main/scala/com/digitalasset/http/ContractsService.scala index d757669ff287..3be613c84ddf 100644 --- a/ledger-service/http-json/src/main/scala/com/digitalasset/http/ContractsService.scala +++ b/ledger-service/http-json/src/main/scala/com/digitalasset/http/ContractsService.scala @@ -423,7 +423,7 @@ class ContractsService( ): Source[ContractStreamStep.LAV1, NotUsed] = { val txnFilter = util.Transactions.transactionFilterFor(parties, templateIds) getActiveContracts(jwt, txnFilter, true) - .map { case GetActiveContractsResponse(offset, _, activeContracts, _) => + .map { case GetActiveContractsResponse(offset, _, activeContracts) => if (activeContracts.nonEmpty) Acs(activeContracts.toVector) else LiveBegin(AbsoluteBookmark(domain.Offset(offset))) } diff --git a/ledger/ledger-api-client/src/main/scala/com/digitalasset/ledger/client/services/commands/tracker/CommandTracker.scala b/ledger/ledger-api-client/src/main/scala/com/digitalasset/ledger/client/services/commands/tracker/CommandTracker.scala index d9de1962dea6..aecc9a706413 100644 --- a/ledger/ledger-api-client/src/main/scala/com/digitalasset/ledger/client/services/commands/tracker/CommandTracker.scala +++ b/ledger/ledger-api-client/src/main/scala/com/digitalasset/ledger/client/services/commands/tracker/CommandTracker.scala @@ -229,7 +229,6 @@ private[commands] class CommandTracker[Context](maxDeduplicationTime: () => JDur TrackingData( commandId, commandTimeout, - submitRequest.value.traceContext, submitRequest.context, )) } @@ -256,7 +255,6 @@ private[commands] class CommandTracker[Context](maxDeduplicationTime: () => JDur Some( com.google.rpc.status.Status(RpcStatus.ABORTED.getCode.value(), "Timeout") ), - traceContext = trackingData.traceContext, ), ) ) @@ -291,7 +289,7 @@ private[commands] class CommandTracker[Context](maxDeduplicationTime: () => JDur pendingCommands .remove(commandId) .map { t => - Ctx(t.context, Completion(commandId, Some(status), traceContext = t.traceContext)) + Ctx(t.context, Completion(commandId, Some(status))) } .orElse { logger.trace("Platform signaled failure for unknown command {}", commandId) diff --git a/ledger/ledger-api-client/src/main/scala/com/digitalasset/ledger/client/services/commands/tracker/TrackingData.scala b/ledger/ledger-api-client/src/main/scala/com/digitalasset/ledger/client/services/commands/tracker/TrackingData.scala index c7950b200cf7..79149705aa66 100644 --- a/ledger/ledger-api-client/src/main/scala/com/digitalasset/ledger/client/services/commands/tracker/TrackingData.scala +++ b/ledger/ledger-api-client/src/main/scala/com/digitalasset/ledger/client/services/commands/tracker/TrackingData.scala @@ -5,11 +5,8 @@ package com.daml.ledger.client.services.commands.tracker import java.time.Instant -import com.daml.ledger.api.v1.trace_context.TraceContext - private[tracker] final case class TrackingData[Context]( commandId: String, commandTimeout: Instant, - traceContext: Option[TraceContext], context: Context, ) diff --git a/ledger/ledger-api-client/src/test/suite/scala/com/digitalasset/ledger/client/services/commands/CommandTrackerFlowTest.scala b/ledger/ledger-api-client/src/test/suite/scala/com/digitalasset/ledger/client/services/commands/CommandTrackerFlowTest.scala index 49d99bfc0934..1491f15146a8 100644 --- a/ledger/ledger-api-client/src/test/suite/scala/com/digitalasset/ledger/client/services/commands/CommandTrackerFlowTest.scala +++ b/ledger/ledger-api-client/src/test/suite/scala/com/digitalasset/ledger/client/services/commands/CommandTrackerFlowTest.scala @@ -213,7 +213,6 @@ class CommandTrackerFlowTest Completion( commandId, Some(Status(Code.RESOURCE_EXHAUSTED.value)), - traceContext = submitRequest.value.traceContext, ) results.expectNext(Ctx(context, failureCompletion)) @@ -235,7 +234,6 @@ class CommandTrackerFlowTest Completion( commandId, Some(Status(Code.ABORTED.value)), - traceContext = submitRequest.value.traceContext, ) completionStreamMock.send(CompletionStreamElement.CompletionElement(completion)) results.requestNext().value shouldEqual completion @@ -255,7 +253,6 @@ class CommandTrackerFlowTest Completion( commandId, Some(Status(Code.ABORTED.value)), - traceContext = submitRequest.value.traceContext, ) completionStreamMock.send(CompletionStreamElement.CompletionElement(completion)) results.requestNext().value shouldEqual completion @@ -392,7 +389,6 @@ class CommandTrackerFlowTest Completion( commandId, Some(Status(Code.INVALID_ARGUMENT.value)), - traceContext = submitRequest.value.traceContext, ) completionStreamMock.send(CompletionStreamElement.CompletionElement(failureCompletion)) @@ -423,7 +419,7 @@ class CommandTrackerFlowTest results.expectNextUnorderedN(commandIds.map { commandId => val successCompletion = - Completion(commandId, Some(Status()), traceContext = submitRequest.value.traceContext) + Completion(commandId, Some(Status())) Ctx(context, successCompletion) }) succeed @@ -457,7 +453,6 @@ class CommandTrackerFlowTest Completion( commandId, Some(Status()), - traceContext = submitRequest.value.traceContext, ), ) ) diff --git a/ledger/ledger-api-common/BUILD.bazel b/ledger/ledger-api-common/BUILD.bazel index 6be3086cfe4a..56fcd2a0ad43 100644 --- a/ledger/ledger-api-common/BUILD.bazel +++ b/ledger/ledger-api-common/BUILD.bazel @@ -47,7 +47,6 @@ da_scala_library( "@maven//:io_dropwizard_metrics_metrics_core", "@maven//:io_grpc_grpc_netty", "@maven//:io_netty_netty_handler", - "@maven//:io_zipkin_brave_brave", "@maven//:org_slf4j_slf4j_api", ], ) @@ -71,7 +70,6 @@ da_scala_library( "//language-support/scala/bindings", "//ledger/ledger-api-domain", "//libs-scala/concurrent", - "@maven//:io_zipkin_brave_brave", ], ) @@ -127,7 +125,6 @@ da_scala_test_suite( "@maven//:io_opentelemetry_opentelemetry_context", "@maven//:io_opentelemetry_opentelemetry_sdk_testing", "@maven//:io_opentelemetry_opentelemetry_sdk_trace", - "@maven//:io_zipkin_brave_brave", "@maven//:org_awaitility_awaitility", "@maven//:org_mockito_mockito_core", "@maven//:org_reactivestreams_reactive_streams", diff --git a/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/CompletionServiceRequestValidator.scala b/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/CompletionServiceRequestValidator.scala index bb78a424ead0..dfa88e67fe8b 100644 --- a/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/CompletionServiceRequestValidator.scala +++ b/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/CompletionServiceRequestValidator.scala @@ -12,7 +12,6 @@ import com.daml.ledger.api.v1.command_completion_service.{ CompletionStreamRequest => GrpcCompletionStreamRequest, } import com.daml.platform.server.api.validation.FieldValidations -import com.daml.platform.server.util.context.TraceContextConversions.toBrave import io.grpc.StatusRuntimeException import com.daml.platform.server.api.validation.ErrorFactories._ @@ -52,6 +51,6 @@ class CompletionServiceRequestValidator(ledgerId: LedgerId, partyNameChecker: Pa ): Either[StatusRuntimeException, completion.CompletionEndRequest] = for { ledgerId <- matchLedgerId(ledgerId)(LedgerId(req.ledgerId)) - } yield completion.CompletionEndRequest(ledgerId, req.traceContext.map(toBrave)) + } yield completion.CompletionEndRequest(ledgerId) } diff --git a/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/SubmitAndWaitRequestValidator.scala b/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/SubmitAndWaitRequestValidator.scala index 327c446b2aeb..283130af19b9 100644 --- a/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/SubmitAndWaitRequestValidator.scala +++ b/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/SubmitAndWaitRequestValidator.scala @@ -8,7 +8,6 @@ import java.time.{Duration, Instant} import com.daml.ledger.api.messages.command.submission import com.daml.ledger.api.v1.command_service.SubmitAndWaitRequest import com.daml.platform.server.api.validation.FieldValidations.requirePresence -import com.daml.platform.server.util.context.TraceContextConversions.toBrave import io.grpc.StatusRuntimeException class SubmitAndWaitRequestValidator(commandsValidator: CommandsValidator) { @@ -27,6 +26,6 @@ class SubmitAndWaitRequestValidator(commandsValidator: CommandsValidator) { currentUtcTime, maxDeduplicationTime, ) - } yield submission.SubmitRequest(validatedCommands, req.traceContext.map(toBrave)) + } yield submission.SubmitRequest(validatedCommands) } diff --git a/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/SubmitRequestValidator.scala b/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/SubmitRequestValidator.scala index ee37823271bc..d91938bbb62c 100644 --- a/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/SubmitRequestValidator.scala +++ b/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/SubmitRequestValidator.scala @@ -8,7 +8,6 @@ import java.time.{Duration, Instant} import com.daml.ledger.api.messages.command.submission import com.daml.ledger.api.v1.command_submission_service.SubmitRequest import com.daml.platform.server.api.validation.FieldValidations.requirePresence -import com.daml.platform.server.util.context.TraceContextConversions.toBrave import io.grpc.StatusRuntimeException class SubmitRequestValidator(commandsValidator: CommandsValidator) { @@ -27,6 +26,6 @@ class SubmitRequestValidator(commandsValidator: CommandsValidator) { currentUtcTime, maxDeduplicationTime, ) - } yield submission.SubmitRequest(validatedCommands, req.traceContext.map(toBrave)) + } yield submission.SubmitRequest(validatedCommands) } diff --git a/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/TransactionServiceRequestValidator.scala b/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/TransactionServiceRequestValidator.scala index 7a290d1710c8..5642d4e0f7e6 100644 --- a/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/TransactionServiceRequestValidator.scala +++ b/ledger/ledger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/TransactionServiceRequestValidator.scala @@ -3,7 +3,6 @@ package com.daml.ledger.api.validation -import brave.propagation.TraceContext import com.daml.lf.data.Ref import com.daml.ledger.api.domain import com.daml.ledger.api.domain.{LedgerId, LedgerOffset} @@ -18,7 +17,6 @@ import com.daml.ledger.api.v1.transaction_service.{ } import com.daml.platform.server.api.validation.ErrorFactories._ import com.daml.platform.server.api.validation.FieldValidations._ -import com.daml.platform.server.util.context.TraceContextConversions._ import io.grpc.StatusRuntimeException object TransactionServiceRequestValidator { @@ -42,7 +40,6 @@ class TransactionServiceRequestValidator( begin: domain.LedgerOffset, end: Option[domain.LedgerOffset], knownParties: Set[Ref.Party], - traceContext: Option[TraceContext], ) private def commonValidations(req: GetTransactionsRequest): Result[PartialValidation] = { @@ -59,7 +56,6 @@ class TransactionServiceRequestValidator( convertedBegin, convertedEnd, knownParties, - req.traceContext.map(toBrave), ) } @@ -89,7 +85,6 @@ class TransactionServiceRequestValidator( partial.end, convertedFilter, req.verbose, - req.traceContext.map(toBrave), ) } } @@ -119,7 +114,6 @@ class TransactionServiceRequestValidator( partial.end, convertedFilter, req.verbose, - req.traceContext.map(toBrave), ) } } @@ -128,7 +122,7 @@ class TransactionServiceRequestValidator( for { ledgerId <- matchId(LedgerId(req.ledgerId)) } yield { - transaction.GetLedgerEndRequest(ledgerId, req.traceContext.map(toBrave)) + transaction.GetLedgerEndRequest(ledgerId) } } @@ -146,7 +140,6 @@ class TransactionServiceRequestValidator( ledgerId, domain.TransactionId(trId), parties, - req.traceContext.map(toBrave), ) } } @@ -164,7 +157,6 @@ class TransactionServiceRequestValidator( ledgerId, domain.EventId(eventId), parties, - req.traceContext.map(toBrave), ) } } diff --git a/ledger/ledger-api-common/src/main/scala/com/digitalasset/platform/server/util/context/TraceContextConversions.scala b/ledger/ledger-api-common/src/main/scala/com/digitalasset/platform/server/util/context/TraceContextConversions.scala deleted file mode 100644 index 3f4c7a633cc2..000000000000 --- a/ledger/ledger-api-common/src/main/scala/com/digitalasset/platform/server/util/context/TraceContextConversions.scala +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 - -package com.daml.platform.server.util.context - -import brave.propagation.{TraceContext => BraveContext} -import com.daml.ledger.api.v1.trace_context.{TraceContext => ProtoContext} - -object TraceContextConversions { - - def toProto(braveContext: BraveContext) = - ProtoContext( - traceIdHigh = braveContext.traceIdHigh(), - traceId = braveContext.traceId(), - spanId = braveContext.spanId(), - parentSpanId = - if (braveContext.parentId == null) None else Some(braveContext.parentId.toLong), - sampled = braveContext.sampled(), - ) - - def toBrave(protoContext: ProtoContext): BraveContext = - BraveContext - .newBuilder() - .traceIdHigh(protoContext.traceIdHigh) - .traceId(protoContext.traceId) - .spanId(protoContext.spanId) - .parentId(protoContext.parentSpanId.fold[java.lang.Long](null)(java.lang.Long.valueOf)) - .sampled(protoContext.sampled) - .shared(true) // Assume the client started the span that's being converted, since it's coming from a grpc payload. - .build() -} diff --git a/ledger/ledger-api-common/src/test/lib/scala/com/digitalasset/ledger/api/validation/ValidatorTestUtils.scala b/ledger/ledger-api-common/src/test/lib/scala/com/digitalasset/ledger/api/validation/ValidatorTestUtils.scala index ceb0889bba52..b6c9cff5f28f 100644 --- a/ledger/ledger-api-common/src/test/lib/scala/com/digitalasset/ledger/api/validation/ValidatorTestUtils.scala +++ b/ledger/ledger-api-common/src/test/lib/scala/com/digitalasset/ledger/api/validation/ValidatorTestUtils.scala @@ -3,7 +3,6 @@ package com.daml.ledger.api.validation -import brave.propagation import com.daml.ledger.api.domain import com.daml.ledger.api.messages.transaction import com.daml.lf.data.Ref @@ -17,11 +16,6 @@ import scala.concurrent.Future trait ValidatorTestUtils extends Matchers with Inside with OptionValues { self: Suite => - protected val traceIdHigh = 1L - protected val traceId = 2L - protected val spanId = 3L - protected val parentSpanId = Some(4L) - protected val sampled = true protected val includedModule = "includedModule" protected val includedTemplate = "includedTemplate" protected val expectedLedgerId = "expectedLedgerId" @@ -57,20 +51,6 @@ trait ValidatorTestUtils extends Matchers with Inside with OptionValues { self: } } - protected def hasExpectedTraceContext(req: transaction.GetTransactionsRequest) = { - inside(req.traceContext.value) { case e => - isExpectedTraceContext(e) - } - } - - protected def isExpectedTraceContext(e: propagation.TraceContext) = { - e.traceIdHigh() shouldEqual traceIdHigh - e.traceId() shouldEqual traceId - e.spanId() shouldEqual spanId - Option(e.parentId()) shouldEqual parentSpanId - e.sampled() shouldEqual sampled - } - protected def requestMustFailWith( request: Future[_], code: Code, diff --git a/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/ledger/api/TraceIdentifiersTest.scala b/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/ledger/api/TraceIdentifiersTest.scala index 2af725fa9770..5dededb5f828 100644 --- a/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/ledger/api/TraceIdentifiersTest.scala +++ b/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/ledger/api/TraceIdentifiersTest.scala @@ -19,14 +19,14 @@ class TraceIdentifiersTest extends AnyWordSpec { "extract identifiers from Transaction" should { "set non-empty values" in { val observed = TraceIdentifiers.fromTransaction( - Transaction("transaction-id", "command-id", "workflow-id", None, Seq(), "offset", None) + Transaction("transaction-id", "command-id", "workflow-id", None, Seq(), "offset") ) observed shouldEqual expected } "not set empty values" in { val observed = - TraceIdentifiers.fromTransaction(Transaction("", "", "", None, Seq(), "", None)) + TraceIdentifiers.fromTransaction(Transaction("", "", "", None, Seq(), "")) observed shouldBe empty } } @@ -41,7 +41,7 @@ class TraceIdentifiersTest extends AnyWordSpec { "not set empty values" in { val observed = - TraceIdentifiers.fromTransaction(Transaction("", "", "", None, Seq(), "", None)) + TraceIdentifiers.fromTransaction(Transaction("", "", "", None, Seq(), "")) observed shouldBe empty } } diff --git a/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/ledger/api/validation/CompletionServiceRequestValidatorTest.scala b/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/ledger/api/validation/CompletionServiceRequestValidatorTest.scala index bcba622ed65a..a2a5bd5bc46f 100644 --- a/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/ledger/api/validation/CompletionServiceRequestValidatorTest.scala +++ b/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/ledger/api/validation/CompletionServiceRequestValidatorTest.scala @@ -10,14 +10,11 @@ import com.daml.ledger.api.v1.command_completion_service.{ } import com.daml.ledger.api.v1.ledger_offset.LedgerOffset import com.daml.ledger.api.v1.ledger_offset.LedgerOffset.LedgerBoundary -import com.daml.ledger.api.v1.trace_context.TraceContext import io.grpc.Status.Code._ import org.scalatest.wordspec.AnyWordSpec class CompletionServiceRequestValidatorTest extends AnyWordSpec with ValidatorTestUtils { - private val traceContext = TraceContext(traceIdHigh, traceId, spanId, parentSpanId, sampled) - private val completionReq = CompletionStreamRequest( expectedLedgerId, expectedApplicationId, @@ -25,7 +22,7 @@ class CompletionServiceRequestValidatorTest extends AnyWordSpec with ValidatorTe Some(LedgerOffset(LedgerOffset.Value.Absolute(absoluteOffset))), ) - private val endReq = CompletionEndRequest(expectedLedgerId, Some(traceContext)) + private val endReq = CompletionEndRequest(expectedLedgerId) val validator = new CompletionServiceRequestValidator( domain.LedgerId(expectedLedgerId), @@ -131,19 +128,11 @@ class CompletionServiceRequestValidatorTest extends AnyWordSpec with ValidatorTe ) } - "work with missing traceContext" in { + "return passed ledger ID" in { inside( - validator.validateCompletionEndRequest(endReq.update(_.optionalTraceContext := None)) + validator.validateCompletionEndRequest(endReq) ) { case Right(out) => out should have(Symbol("ledgerId")(expectedLedgerId)) - out.traceContext shouldBe empty - } - } - - "work with present traceContext" in { - inside(validator.validateCompletionEndRequest(endReq)) { case Right(out) => - out should have(Symbol("ledgerId")(expectedLedgerId)) - isExpectedTraceContext(out.traceContext.value) } } } diff --git a/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/ledger/api/validation/TransactionServiceRequestValidatorTest.scala b/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/ledger/api/validation/TransactionServiceRequestValidatorTest.scala index 38152df424d0..609d8344b651 100644 --- a/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/ledger/api/validation/TransactionServiceRequestValidatorTest.scala +++ b/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/ledger/api/validation/TransactionServiceRequestValidatorTest.scala @@ -6,7 +6,6 @@ package com.daml.ledger.api.validation import com.daml.ledger.api.domain import com.daml.ledger.api.v1.ledger_offset.LedgerOffset import com.daml.ledger.api.v1.ledger_offset.LedgerOffset.LedgerBoundary -import com.daml.ledger.api.v1.trace_context.TraceContext import com.daml.ledger.api.v1.transaction_filter.{Filters, InclusiveFilters, TransactionFilter} import com.daml.ledger.api.v1.transaction_service.{ GetLedgerEndRequest, @@ -20,8 +19,6 @@ import org.scalatest.wordspec.AnyWordSpec class TransactionServiceRequestValidatorTest extends AnyWordSpec with ValidatorTestUtils { - private val traceContext = TraceContext(traceIdHigh, traceId, spanId, parentSpanId, sampled) - private val txReq = GetTransactionsRequest( expectedLedgerId, Some(LedgerOffset(LedgerOffset.Value.Boundary(LedgerBoundary.LEDGER_BEGIN))), @@ -47,7 +44,6 @@ class TransactionServiceRequestValidatorTest extends AnyWordSpec with ValidatorT ) ), verbose, - Some(traceContext), ) private val txTreeReq = GetTransactionsRequest( expectedLedgerId, @@ -55,16 +51,15 @@ class TransactionServiceRequestValidatorTest extends AnyWordSpec with ValidatorT Some(LedgerOffset(LedgerOffset.Value.Absolute(absoluteOffset))), Some(TransactionFilter(Map(party -> Filters.defaultInstance))), verbose, - Some(traceContext), ) - private val endReq = GetLedgerEndRequest(expectedLedgerId, Some(traceContext)) + private val endReq = GetLedgerEndRequest(expectedLedgerId) private val txByEvIdReq = - GetTransactionByEventIdRequest(expectedLedgerId, eventId, Seq(party), Some(traceContext)) + GetTransactionByEventIdRequest(expectedLedgerId, eventId, Seq(party)) private val txByIdReq = - GetTransactionByIdRequest(expectedLedgerId, transactionId, Seq(party), Some(traceContext)) + GetTransactionByIdRequest(expectedLedgerId, transactionId, Seq(party)) val sut = new TransactionServiceRequestValidator( domain.LedgerId(expectedLedgerId), @@ -187,7 +182,6 @@ class TransactionServiceRequestValidatorTest extends AnyWordSpec with ValidatorT filtersByParty should have size 1 hasExpectedFilters(req) req.verbose shouldEqual verbose - hasExpectedTraceContext(req) } } @@ -210,7 +204,6 @@ class TransactionServiceRequestValidatorTest extends AnyWordSpec with ValidatorT filters shouldEqual domain.Filters(Some(domain.InclusiveFilters(Set()))) } req.verbose shouldEqual verbose - hasExpectedTraceContext(req) } } @@ -233,22 +226,6 @@ class TransactionServiceRequestValidatorTest extends AnyWordSpec with ValidatorT filters shouldEqual domain.Filters(None) } req.verbose shouldEqual verbose - hasExpectedTraceContext(req) - } - } - - "tolerate missing traceContext" in { - inside( - sut.validate(txReq.update(_.optionalTraceContext := None), ledgerEnd) - ) { case Right(req) => - req.ledgerId shouldEqual expectedLedgerId - req.startExclusive shouldEqual domain.LedgerOffset.LedgerBegin - req.endInclusive shouldEqual Some(domain.LedgerOffset.Absolute(absoluteOffset)) - val filtersByParty = req.filter.filtersByParty - filtersByParty should have size 1 - hasExpectedFilters(req) - req.verbose shouldEqual verbose - req.traceContext shouldBe empty } } @@ -259,7 +236,6 @@ class TransactionServiceRequestValidatorTest extends AnyWordSpec with ValidatorT req.endInclusive shouldEqual Some(domain.LedgerOffset.Absolute(absoluteOffset)) hasExpectedFilters(req) req.verbose shouldEqual verbose - hasExpectedTraceContext(req) } } } @@ -274,7 +250,6 @@ class TransactionServiceRequestValidatorTest extends AnyWordSpec with ValidatorT req.parties should have size 1 req.parties.headOption.value shouldEqual party req.verbose shouldEqual verbose - isExpectedTraceContext(req.traceContext.value) } } @@ -328,18 +303,9 @@ class TransactionServiceRequestValidatorTest extends AnyWordSpec with ValidatorT ) } - "work with missing traceContext" in { - inside(sut.validateLedgerEnd(endReq.update(_.optionalTraceContext := None))) { - case Right(out) => - out should have(Symbol("ledgerId")(expectedLedgerId)) - out.traceContext shouldBe empty - } - } - - "work with present traceContext" in { + "return passed ledger ID" in { inside(sut.validateLedgerEnd(endReq)) { case Right(out) => out should have(Symbol("ledgerId")(expectedLedgerId)) - isExpectedTraceContext(out.traceContext.value) } } } @@ -370,18 +336,9 @@ class TransactionServiceRequestValidatorTest extends AnyWordSpec with ValidatorT ) } - "work with missing traceContext" in { - inside(sut.validateTransactionById(txByIdReq.update(_.optionalTraceContext := None))) { - case Right(out) => - out should have(Symbol("ledgerId")(expectedLedgerId)) - out.traceContext shouldBe empty - } - } - - "work with present TraceContext" in { + "return passed ledger ID" in { inside(sut.validateTransactionById(txByIdReq)) { case Right(out) => out should have(Symbol("ledgerId")(expectedLedgerId)) - isExpectedTraceContext(out.traceContext.value) } } @@ -413,19 +370,11 @@ class TransactionServiceRequestValidatorTest extends AnyWordSpec with ValidatorT ) } - "work with missing traceContext" in { + "return passed ledger ID" in { inside( - sut.validateTransactionByEventId(txByEvIdReq.update(_.optionalTraceContext := None)) + sut.validateTransactionByEventId(txByEvIdReq) ) { case Right(out) => out should have(Symbol("ledgerId")(expectedLedgerId)) - out.traceContext shouldBe empty - } - } - - "work with present TraceContext" in { - inside(sut.validateTransactionByEventId(txByEvIdReq)) { case Right(out) => - out should have(Symbol("ledgerId")(expectedLedgerId)) - isExpectedTraceContext(out.traceContext.value) } } diff --git a/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/platform/server/util/context/TraceContextConversionsTest.scala b/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/platform/server/util/context/TraceContextConversionsTest.scala deleted file mode 100644 index bd2726c1e26e..000000000000 --- a/ledger/ledger-api-common/src/test/suite/scala/com/digitalasset/platform/server/util/context/TraceContextConversionsTest.scala +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 - -package com.daml.platform.server.util.context - -import com.daml.ledger.api.v1.trace_context.TraceContext -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - -class TraceContextConversionsTest extends AnyWordSpec with Matchers { - - private val sut = TraceContextConversions - - "TraceContextConversionsTest" should { - - "convert symmetrically" in { - val in = TraceContext(1L, 2L, 3L, Some(4L), sampled = true) - - val brave = sut.toBrave(in) - val out = sut.toProto(brave) - - in shouldEqual out - - } - - } -} diff --git a/ledger/ledger-api-domain/BUILD.bazel b/ledger/ledger-api-domain/BUILD.bazel index e40cd467a17b..3f42496193f8 100644 --- a/ledger/ledger-api-domain/BUILD.bazel +++ b/ledger/ledger-api-domain/BUILD.bazel @@ -21,7 +21,6 @@ da_scala_library( "//daml-lf/transaction", "//ledger/ledger-configuration", "//libs-scala/logging-entries", - "@maven//:io_zipkin_brave_brave", ], ) diff --git a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/domain.scala b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/domain.scala index 7f87a78b64b4..cc471bcd2cca 100644 --- a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/domain.scala +++ b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/domain.scala @@ -5,7 +5,6 @@ package com.daml.ledger.api import java.time.Instant -import brave.propagation.TraceContext import com.daml.ledger.api.domain.Event.{CreateOrArchiveEvent, CreateOrExerciseEvent} import com.daml.ledger.configuration.Configuration import com.daml.lf.command.{Commands => LfCommands} @@ -134,8 +133,6 @@ object domain { def effectiveAt: Instant def offset: LedgerOffset.Absolute - - def traceContext: Option[TraceContext] } final case class TransactionTree( @@ -146,7 +143,6 @@ object domain { offset: LedgerOffset.Absolute, eventsById: immutable.Map[EventId, CreateOrExerciseEvent], rootEventIds: immutable.Seq[EventId], - traceContext: Option[TraceContext], ) extends TransactionBase final case class Transaction( @@ -156,7 +152,6 @@ object domain { effectiveAt: Instant, events: immutable.Seq[CreateOrArchiveEvent], offset: LedgerOffset.Absolute, - traceContext: Option[TraceContext], ) extends TransactionBase sealed trait CompletionEvent extends Product with Serializable { diff --git a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/command/completion/CompletionEndRequest.scala b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/command/completion/CompletionEndRequest.scala index e94e2dec67d1..3619fc1b9b8f 100644 --- a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/command/completion/CompletionEndRequest.scala +++ b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/command/completion/CompletionEndRequest.scala @@ -3,7 +3,6 @@ package com.daml.ledger.api.messages.command.completion -import brave.propagation.TraceContext import com.daml.ledger.api.domain.LedgerId -case class CompletionEndRequest(ledgerId: LedgerId, traceContext: Option[TraceContext]) +case class CompletionEndRequest(ledgerId: LedgerId) diff --git a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/command/submission/SubmitRequest.scala b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/command/submission/SubmitRequest.scala index 8c41ab3e2b38..fb62e2e585e4 100644 --- a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/command/submission/SubmitRequest.scala +++ b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/command/submission/SubmitRequest.scala @@ -3,7 +3,6 @@ package com.daml.ledger.api.messages.command.submission -import brave.propagation.TraceContext import com.daml.ledger.api.domain -case class SubmitRequest(commands: domain.Commands, traceContext: Option[TraceContext]) +case class SubmitRequest(commands: domain.Commands) diff --git a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetLedgerEndRequest.scala b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetLedgerEndRequest.scala index 426cd6bfddb9..87065dbdceab 100644 --- a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetLedgerEndRequest.scala +++ b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetLedgerEndRequest.scala @@ -3,7 +3,6 @@ package com.daml.ledger.api.messages.transaction -import brave.propagation.TraceContext import com.daml.ledger.api.domain.LedgerId -final case class GetLedgerEndRequest(ledgerId: LedgerId, traceContext: Option[TraceContext]) +final case class GetLedgerEndRequest(ledgerId: LedgerId) diff --git a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionByEventIdRequest.scala b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionByEventIdRequest.scala index 3fce775fc8d2..c7d57ca12534 100644 --- a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionByEventIdRequest.scala +++ b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionByEventIdRequest.scala @@ -3,7 +3,6 @@ package com.daml.ledger.api.messages.transaction -import brave.propagation.TraceContext import com.daml.lf.data.Ref.Party import com.daml.ledger.api.domain.{EventId, LedgerId} @@ -11,5 +10,4 @@ final case class GetTransactionByEventIdRequest( ledgerId: LedgerId, eventId: EventId, requestingParties: Set[Party], - traceContext: Option[TraceContext], ) diff --git a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionByIdRequest.scala b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionByIdRequest.scala index 9a0e2792e995..9412b0abdb84 100644 --- a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionByIdRequest.scala +++ b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionByIdRequest.scala @@ -3,7 +3,6 @@ package com.daml.ledger.api.messages.transaction -import brave.propagation.TraceContext import com.daml.ledger.api.domain.{LedgerId, TransactionId} import com.daml.lf.data.Ref.Party @@ -11,5 +10,4 @@ final case class GetTransactionByIdRequest( ledgerId: LedgerId, transactionId: TransactionId, requestingParties: Set[Party], - traceContext: Option[TraceContext], ) diff --git a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionTreesRequest.scala b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionTreesRequest.scala index 856ae4d52703..25a6b12f7486 100644 --- a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionTreesRequest.scala +++ b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionTreesRequest.scala @@ -3,7 +3,6 @@ package com.daml.ledger.api.messages.transaction -import brave.propagation.TraceContext import com.daml.ledger.api.domain.{LedgerId, LedgerOffset} import com.daml.lf.data.Ref.Party @@ -13,5 +12,4 @@ final case class GetTransactionTreesRequest( endInclusive: Option[LedgerOffset], parties: Set[Party], verbose: Boolean, - traceContext: Option[TraceContext], ) diff --git a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionsRequest.scala b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionsRequest.scala index 4ff8d36a133c..eb51752c8d2a 100644 --- a/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionsRequest.scala +++ b/ledger/ledger-api-domain/src/main/scala/com/digitalasset/ledger/api/messages/transaction/GetTransactionsRequest.scala @@ -3,7 +3,6 @@ package com.daml.ledger.api.messages.transaction -import brave.propagation.TraceContext import com.daml.ledger.api.domain.{LedgerId, LedgerOffset, TransactionFilter} final case class GetTransactionsRequest( @@ -12,5 +11,4 @@ final case class GetTransactionsRequest( endInclusive: Option[LedgerOffset], filter: TransactionFilter, verbose: Boolean, - traceContext: Option[TraceContext], ) diff --git a/ledger/participant-integration-api/src/main/scala/platform/apiserver/services/tracking/TrackerImpl.scala b/ledger/participant-integration-api/src/main/scala/platform/apiserver/services/tracking/TrackerImpl.scala index 0df8344658eb..a48849ad1baa 100644 --- a/ledger/participant-integration-api/src/main/scala/platform/apiserver/services/tracking/TrackerImpl.scala +++ b/ledger/participant-integration-api/src/main/scala/platform/apiserver/services/tracking/TrackerImpl.scala @@ -52,10 +52,7 @@ private[services] final class TrackerImpl( .offer( Ctx( promise, - SubmitRequest( - request.commands, - request.traceContext, - ), + SubmitRequest(request.commands), ) ) .andThen { @@ -99,10 +96,10 @@ private[services] object TrackerImpl { .viaMat(tracker)(Keep.both) .toMat(Sink.foreach { case Ctx(promise, result, _) => result match { - case compl @ Completion(_, Some(Status(Code.OK.value, _, _, _)), _, _) => + case compl @ Completion(_, Some(Status(Code.OK.value, _, _, _)), _) => logger.trace("Completing promise with success") promise.trySuccess(compl) - case Completion(_, statusO, _, _) => + case Completion(_, statusO, _) => val status = statusO .map(status => GrpcStatus diff --git a/ledger/participant-integration-api/src/main/scala/platform/store/appendonlydao/events/EventsTable.scala b/ledger/participant-integration-api/src/main/scala/platform/store/appendonlydao/events/EventsTable.scala index 3da5f21e9949..41a0b9276f83 100644 --- a/ledger/participant-integration-api/src/main/scala/platform/store/appendonlydao/events/EventsTable.scala +++ b/ledger/participant-integration-api/src/main/scala/platform/store/appendonlydao/events/EventsTable.scala @@ -83,7 +83,6 @@ object EventsTable { offset = "", // only the last response will have an offset. workflowId = entry.workflowId, activeContracts = Seq(entry.event.getCreated), - traceContext = None, ) case entry => throw new IllegalStateException( @@ -133,7 +132,6 @@ object EventsTable { offset = ApiOffset.toApiString(first.eventOffset), eventsById = eventsById, rootEventIds = rootEventIds, - traceContext = None, ) } diff --git a/ledger/participant-integration-api/src/main/scala/platform/store/appendonlydao/events/TransactionLogUpdatesConversions.scala b/ledger/participant-integration-api/src/main/scala/platform/store/appendonlydao/events/TransactionLogUpdatesConversions.scala index 4aab13873172..cbd3dd793cc8 100644 --- a/ledger/participant-integration-api/src/main/scala/platform/store/appendonlydao/events/TransactionLogUpdatesConversions.scala +++ b/ledger/participant-integration-api/src/main/scala/platform/store/appendonlydao/events/TransactionLogUpdatesConversions.scala @@ -61,7 +61,6 @@ private[events] object TransactionLogUpdatesConversions { effectiveAt = Some(instantToTimestamp(first.ledgerEffectiveTime)), events = flatEvents, offset = ApiOffset.toApiString(tx.offset), - traceContext = None, ) ) } else None @@ -248,7 +247,6 @@ private[events] object TransactionLogUpdatesConversions { offset = ApiOffset.toApiString(tx.offset), eventsById = eventsById, rootEventIds = rootEventIds, - traceContext = None, ) ) } diff --git a/ledger/participant-integration-api/src/main/scala/platform/store/dao/events/EventsTable.scala b/ledger/participant-integration-api/src/main/scala/platform/store/dao/events/EventsTable.scala index 875e6f0754d3..0a97b5786cc8 100644 --- a/ledger/participant-integration-api/src/main/scala/platform/store/dao/events/EventsTable.scala +++ b/ledger/participant-integration-api/src/main/scala/platform/store/dao/events/EventsTable.scala @@ -162,7 +162,6 @@ private[events] object EventsTable { offset = "", // only the last response will have an offset. workflowId = entry.workflowId, activeContracts = Seq(entry.event.getCreated), - traceContext = None, ) case entry => throw new IllegalStateException( @@ -212,7 +211,6 @@ private[events] object EventsTable { offset = ApiOffset.toApiString(first.eventOffset), eventsById = eventsById, rootEventIds = rootEventIds, - traceContext = None, ) } diff --git a/ledger/participant-integration-api/src/test/suite/scala/platform/apiserver/services/ApiSubmissionServiceSpec.scala b/ledger/participant-integration-api/src/test/suite/scala/platform/apiserver/services/ApiSubmissionServiceSpec.scala index 6b704b583f64..0ec6c814cbee 100644 --- a/ledger/participant-integration-api/src/test/suite/scala/platform/apiserver/services/ApiSubmissionServiceSpec.scala +++ b/ledger/participant-integration-api/src/test/suite/scala/platform/apiserver/services/ApiSubmissionServiceSpec.scala @@ -260,8 +260,7 @@ class ApiSubmissionServiceSpec submittedAt = Instant.MIN, deduplicateUntil = Instant.MIN, commands = LfCommands(ImmArray.empty, Timestamp.MinValue, ""), - ), - None, + ) ) when( mockCommandExecutor.execute(eqTo(submitRequest.commands), any[Hash])( diff --git a/ledger/sandbox-classic/src/test/lib/scala/platform/sandbox/ScenarioLoadingITBase.scala b/ledger/sandbox-classic/src/test/lib/scala/platform/sandbox/ScenarioLoadingITBase.scala index 826a5dfe0b26..1b65a5bf660e 100644 --- a/ledger/sandbox-classic/src/test/lib/scala/platform/sandbox/ScenarioLoadingITBase.scala +++ b/ledger/sandbox-classic/src/test/lib/scala/platform/sandbox/ScenarioLoadingITBase.scala @@ -104,7 +104,7 @@ abstract class ScenarioLoadingITBase lookForContract(events, templateIds.dummyFactory) lookForContract(events, templateIds.dummyContractFactory) - val GetActiveContractsResponse(offset, workflowId, activeContracts, _) = resp.last + val GetActiveContractsResponse(offset, workflowId, activeContracts) = resp.last offset should not be empty workflowId shouldBe empty activeContracts shouldBe empty diff --git a/ledger/sandbox-perf/src/perf/lib/scala/com/digitalasset/platform/sandbox/perf/TestHelper.scala b/ledger/sandbox-perf/src/perf/lib/scala/com/digitalasset/platform/sandbox/perf/TestHelper.scala index b9f7c30d017d..513dcffd2629 100644 --- a/ledger/sandbox-perf/src/perf/lib/scala/com/digitalasset/platform/sandbox/perf/TestHelper.scala +++ b/ledger/sandbox-perf/src/perf/lib/scala/com/digitalasset/platform/sandbox/perf/TestHelper.scala @@ -12,7 +12,6 @@ import com.daml.ledger.api.v1.active_contracts_service.GetActiveContractsRespons import com.daml.ledger.api.v1.command_service.SubmitAndWaitRequest import com.daml.ledger.api.v1.commands.{Command, Commands} import com.daml.ledger.api.v1.event.CreatedEvent -import com.daml.ledger.api.v1.trace_context.TraceContext import com.daml.ledger.api.v1.transaction_filter.{Filters, TransactionFilter} import com.daml.ledger.api.v1.value.{Identifier, Value} import com.daml.ledger.client.services.acs.ActiveContractSetClient @@ -30,7 +29,6 @@ trait TestHelper { val ledgerId: String = "ledger-server" val applicationId: String = "app1" - val traceContext = Some(TraceContext(1L, 2L, 3L, Some(4L))) val party = "party" val rangeOfIntsTemplateId = @@ -71,7 +69,7 @@ trait TestHelper { party = party, commands = Seq(Command(command)), ) - SubmitAndWaitRequest(Some(commands), traceContext = traceContext) + SubmitAndWaitRequest(Some(commands)) } def rangeOfIntsCreateCommand( diff --git a/maven_install_2.12.json b/maven_install_2.12.json index 5e391f2b9178..c9c946b7c700 100644 --- a/maven_install_2.12.json +++ b/maven_install_2.12.json @@ -1,6 +1,6 @@ { "dependency_tree": { - "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": 194455749, + "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": 131956418, "conflict_resolution": {}, "dependencies": [ { @@ -4804,132 +4804,6 @@ "sha256": "450c5bd181246d2cd0a10bab3807a9bdd086fa1a9b1c0ccd95217a49ebf61a31", "url": "https://repo1.maven.org/maven2/io/spray/spray-json_2.12/1.3.5/spray-json_2.12-1.3.5-sources.jar" }, - { - "coord": "io.zipkin.brave:brave:4.6.0", - "dependencies": [ - "io.zipkin.java:zipkin:1.31.3", - "io.zipkin.reporter:zipkin-reporter:1.0.4" - ], - "directDependencies": [ - "io.zipkin.java:zipkin:1.31.3", - "io.zipkin.reporter:zipkin-reporter:1.0.4" - ], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/brave/brave/4.6.0/brave-4.6.0.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/brave/brave/4.6.0/brave-4.6.0.jar" - ], - "sha256": "70d340f8bd294682adc8240cd41cd369a0b3f0037f3fb2f15bd9bd836a3402d9", - "url": "https://repo1.maven.org/maven2/io/zipkin/brave/brave/4.6.0/brave-4.6.0.jar" - }, - { - "coord": "io.zipkin.brave:brave:jar:sources:4.6.0", - "dependencies": [ - "io.zipkin.java:zipkin:jar:sources:1.31.3", - "io.zipkin.reporter:zipkin-reporter:jar:sources:1.0.4" - ], - "directDependencies": [ - "io.zipkin.java:zipkin:jar:sources:1.31.3", - "io.zipkin.reporter:zipkin-reporter:jar:sources:1.0.4" - ], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/brave/brave/4.6.0/brave-4.6.0-sources.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/brave/brave/4.6.0/brave-4.6.0-sources.jar" - ], - "sha256": "a55ccb6f2c1d323c505f8256443882ac77cd266178068686ca754d789e0bb35a", - "url": "https://repo1.maven.org/maven2/io/zipkin/brave/brave/4.6.0/brave-4.6.0-sources.jar" - }, - { - "coord": "io.zipkin.java:zipkin:1.31.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/java/zipkin/1.31.3/zipkin-1.31.3.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/java/zipkin/1.31.3/zipkin-1.31.3.jar" - ], - "sha256": "e59babd8d2858a8b01172d65ddfdf74536e93808b45e19d11efbc6c624809562", - "url": "https://repo1.maven.org/maven2/io/zipkin/java/zipkin/1.31.3/zipkin-1.31.3.jar" - }, - { - "coord": "io.zipkin.java:zipkin:jar:sources:1.31.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/java/zipkin/1.31.3/zipkin-1.31.3-sources.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/java/zipkin/1.31.3/zipkin-1.31.3-sources.jar" - ], - "sha256": "99e17c4fabc486516553fbf6ff08b8823a14e335ede0b6ac4f9c99b9c98e4849", - "url": "https://repo1.maven.org/maven2/io/zipkin/java/zipkin/1.31.3/zipkin-1.31.3-sources.jar" - }, - { - "coord": "io.zipkin.reporter:zipkin-reporter:1.0.4", - "dependencies": [ - "io.zipkin.java:zipkin:1.31.3" - ], - "directDependencies": [ - "io.zipkin.java:zipkin:1.31.3" - ], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/reporter/zipkin-reporter/1.0.4/zipkin-reporter-1.0.4.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-reporter/1.0.4/zipkin-reporter-1.0.4.jar" - ], - "sha256": "ef36edaa89c573abc71fd2e7278ae3adb2eafca4f541a5ce5af1b25e0dae15f0", - "url": "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-reporter/1.0.4/zipkin-reporter-1.0.4.jar" - }, - { - "coord": "io.zipkin.reporter:zipkin-reporter:jar:sources:1.0.4", - "dependencies": [ - "io.zipkin.java:zipkin:jar:sources:1.31.3" - ], - "directDependencies": [ - "io.zipkin.java:zipkin:jar:sources:1.31.3" - ], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/reporter/zipkin-reporter/1.0.4/zipkin-reporter-1.0.4-sources.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-reporter/1.0.4/zipkin-reporter-1.0.4-sources.jar" - ], - "sha256": "7b2dfc17c4787a955aaffeb23db8c20d111af4a26e690e7e064a8c4bc1fe4afc", - "url": "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-reporter/1.0.4/zipkin-reporter-1.0.4-sources.jar" - }, - { - "coord": "io.zipkin.reporter:zipkin-sender-okhttp3:1.0.4", - "dependencies": [ - "io.zipkin.java:zipkin:1.31.3", - "com.squareup.okhttp3:okhttp:3.11.0", - "io.zipkin.reporter:zipkin-reporter:1.0.4", - "com.squareup.okio:okio:1.14.0" - ], - "directDependencies": [ - "com.squareup.okhttp3:okhttp:3.11.0", - "io.zipkin.java:zipkin:1.31.3", - "io.zipkin.reporter:zipkin-reporter:1.0.4" - ], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/reporter/zipkin-sender-okhttp3/1.0.4/zipkin-sender-okhttp3-1.0.4.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-sender-okhttp3/1.0.4/zipkin-sender-okhttp3-1.0.4.jar" - ], - "sha256": "02b560a786ff80457ce7336bc2662acf630add7079eef7e6469c44b49ab8106f", - "url": "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-sender-okhttp3/1.0.4/zipkin-sender-okhttp3-1.0.4.jar" - }, - { - "coord": "io.zipkin.reporter:zipkin-sender-okhttp3:jar:sources:1.0.4", - "dependencies": [ - "com.squareup.okhttp3:okhttp:jar:sources:3.11.0", - "com.squareup.okio:okio:jar:sources:1.14.0", - "io.zipkin.java:zipkin:jar:sources:1.31.3", - "io.zipkin.reporter:zipkin-reporter:jar:sources:1.0.4" - ], - "directDependencies": [ - "com.squareup.okhttp3:okhttp:jar:sources:3.11.0", - "io.zipkin.java:zipkin:jar:sources:1.31.3", - "io.zipkin.reporter:zipkin-reporter:jar:sources:1.0.4" - ], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/reporter/zipkin-sender-okhttp3/1.0.4/zipkin-sender-okhttp3-1.0.4-sources.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-sender-okhttp3/1.0.4/zipkin-sender-okhttp3-1.0.4-sources.jar" - ], - "sha256": "53ec8c5104893d06aac7e1687da3bf78c5bea2bb642bc2a61d234e266faccc92", - "url": "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-sender-okhttp3/1.0.4/zipkin-sender-okhttp3-1.0.4-sources.jar" - }, { "coord": "javax.annotation:javax.annotation-api:1.2", "dependencies": [], diff --git a/maven_install_2.13.json b/maven_install_2.13.json index 05d078873ad9..d3ec8cac2827 100644 --- a/maven_install_2.13.json +++ b/maven_install_2.13.json @@ -1,6 +1,6 @@ { "dependency_tree": { - "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": -917953200, + "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": -228176627, "conflict_resolution": {}, "dependencies": [ { @@ -6948,132 +6948,6 @@ "sha256": "a9c8d3629191b92254c03f10db2d922d0978dac5104804f7bcaff312e5a74685", "url": "https://repo1.maven.org/maven2/io/suzaku/boopickle_2.13/1.3.3/boopickle_2.13-1.3.3-sources.jar" }, - { - "coord": "io.zipkin.brave:brave:4.6.0", - "dependencies": [ - "io.zipkin.java:zipkin:1.31.3", - "io.zipkin.reporter:zipkin-reporter:1.0.4" - ], - "directDependencies": [ - "io.zipkin.java:zipkin:1.31.3", - "io.zipkin.reporter:zipkin-reporter:1.0.4" - ], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/brave/brave/4.6.0/brave-4.6.0.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/brave/brave/4.6.0/brave-4.6.0.jar" - ], - "sha256": "70d340f8bd294682adc8240cd41cd369a0b3f0037f3fb2f15bd9bd836a3402d9", - "url": "https://repo1.maven.org/maven2/io/zipkin/brave/brave/4.6.0/brave-4.6.0.jar" - }, - { - "coord": "io.zipkin.brave:brave:jar:sources:4.6.0", - "dependencies": [ - "io.zipkin.java:zipkin:jar:sources:1.31.3", - "io.zipkin.reporter:zipkin-reporter:jar:sources:1.0.4" - ], - "directDependencies": [ - "io.zipkin.java:zipkin:jar:sources:1.31.3", - "io.zipkin.reporter:zipkin-reporter:jar:sources:1.0.4" - ], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/brave/brave/4.6.0/brave-4.6.0-sources.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/brave/brave/4.6.0/brave-4.6.0-sources.jar" - ], - "sha256": "a55ccb6f2c1d323c505f8256443882ac77cd266178068686ca754d789e0bb35a", - "url": "https://repo1.maven.org/maven2/io/zipkin/brave/brave/4.6.0/brave-4.6.0-sources.jar" - }, - { - "coord": "io.zipkin.java:zipkin:1.31.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/java/zipkin/1.31.3/zipkin-1.31.3.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/java/zipkin/1.31.3/zipkin-1.31.3.jar" - ], - "sha256": "e59babd8d2858a8b01172d65ddfdf74536e93808b45e19d11efbc6c624809562", - "url": "https://repo1.maven.org/maven2/io/zipkin/java/zipkin/1.31.3/zipkin-1.31.3.jar" - }, - { - "coord": "io.zipkin.java:zipkin:jar:sources:1.31.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/java/zipkin/1.31.3/zipkin-1.31.3-sources.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/java/zipkin/1.31.3/zipkin-1.31.3-sources.jar" - ], - "sha256": "99e17c4fabc486516553fbf6ff08b8823a14e335ede0b6ac4f9c99b9c98e4849", - "url": "https://repo1.maven.org/maven2/io/zipkin/java/zipkin/1.31.3/zipkin-1.31.3-sources.jar" - }, - { - "coord": "io.zipkin.reporter:zipkin-reporter:1.0.4", - "dependencies": [ - "io.zipkin.java:zipkin:1.31.3" - ], - "directDependencies": [ - "io.zipkin.java:zipkin:1.31.3" - ], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/reporter/zipkin-reporter/1.0.4/zipkin-reporter-1.0.4.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-reporter/1.0.4/zipkin-reporter-1.0.4.jar" - ], - "sha256": "ef36edaa89c573abc71fd2e7278ae3adb2eafca4f541a5ce5af1b25e0dae15f0", - "url": "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-reporter/1.0.4/zipkin-reporter-1.0.4.jar" - }, - { - "coord": "io.zipkin.reporter:zipkin-reporter:jar:sources:1.0.4", - "dependencies": [ - "io.zipkin.java:zipkin:jar:sources:1.31.3" - ], - "directDependencies": [ - "io.zipkin.java:zipkin:jar:sources:1.31.3" - ], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/reporter/zipkin-reporter/1.0.4/zipkin-reporter-1.0.4-sources.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-reporter/1.0.4/zipkin-reporter-1.0.4-sources.jar" - ], - "sha256": "7b2dfc17c4787a955aaffeb23db8c20d111af4a26e690e7e064a8c4bc1fe4afc", - "url": "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-reporter/1.0.4/zipkin-reporter-1.0.4-sources.jar" - }, - { - "coord": "io.zipkin.reporter:zipkin-sender-okhttp3:1.0.4", - "dependencies": [ - "io.zipkin.java:zipkin:1.31.3", - "com.squareup.okhttp3:okhttp:3.11.0", - "io.zipkin.reporter:zipkin-reporter:1.0.4", - "com.squareup.okio:okio:1.14.0" - ], - "directDependencies": [ - "com.squareup.okhttp3:okhttp:3.11.0", - "io.zipkin.java:zipkin:1.31.3", - "io.zipkin.reporter:zipkin-reporter:1.0.4" - ], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/reporter/zipkin-sender-okhttp3/1.0.4/zipkin-sender-okhttp3-1.0.4.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-sender-okhttp3/1.0.4/zipkin-sender-okhttp3-1.0.4.jar" - ], - "sha256": "02b560a786ff80457ce7336bc2662acf630add7079eef7e6469c44b49ab8106f", - "url": "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-sender-okhttp3/1.0.4/zipkin-sender-okhttp3-1.0.4.jar" - }, - { - "coord": "io.zipkin.reporter:zipkin-sender-okhttp3:jar:sources:1.0.4", - "dependencies": [ - "com.squareup.okhttp3:okhttp:jar:sources:3.11.0", - "com.squareup.okio:okio:jar:sources:1.14.0", - "io.zipkin.java:zipkin:jar:sources:1.31.3", - "io.zipkin.reporter:zipkin-reporter:jar:sources:1.0.4" - ], - "directDependencies": [ - "com.squareup.okhttp3:okhttp:jar:sources:3.11.0", - "io.zipkin.java:zipkin:jar:sources:1.31.3", - "io.zipkin.reporter:zipkin-reporter:jar:sources:1.0.4" - ], - "file": "v1/https/repo1.maven.org/maven2/io/zipkin/reporter/zipkin-sender-okhttp3/1.0.4/zipkin-sender-okhttp3-1.0.4-sources.jar", - "mirror_urls": [ - "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-sender-okhttp3/1.0.4/zipkin-sender-okhttp3-1.0.4-sources.jar" - ], - "sha256": "53ec8c5104893d06aac7e1687da3bf78c5bea2bb642bc2a61d234e266faccc92", - "url": "https://repo1.maven.org/maven2/io/zipkin/reporter/zipkin-sender-okhttp3/1.0.4/zipkin-sender-okhttp3-1.0.4-sources.jar" - }, { "coord": "javax.annotation:javax.annotation-api:1.2", "dependencies": [], diff --git a/navigator/backend/src/main/scala/com/digitalasset/navigator/store/platform/PlatformSubscriber.scala b/navigator/backend/src/main/scala/com/digitalasset/navigator/store/platform/PlatformSubscriber.scala index 0fb1ba1401f2..51964f457794 100644 --- a/navigator/backend/src/main/scala/com/digitalasset/navigator/store/platform/PlatformSubscriber.scala +++ b/navigator/backend/src/main/scala/com/digitalasset/navigator/store/platform/PlatformSubscriber.scala @@ -333,7 +333,7 @@ class PlatformSubscriber( // Send command to ledger commandTracker - .offer(Ctx(command, V1.command_submission_service.SubmitRequest(Some(commands), None))) + .offer(Ctx(command, V1.command_submission_service.SubmitRequest(Some(commands)))) .andThen { case Success(QOR.Dropped) => party.addCommandStatus( diff --git a/nix/tools/nix-store-gcs-proxy/deps.nix b/nix/tools/nix-store-gcs-proxy/deps.nix index b5ae542876d7..0839ff0399bb 100644 --- a/nix/tools/nix-store-gcs-proxy/deps.nix +++ b/nix/tools/nix-store-gcs-proxy/deps.nix @@ -441,15 +441,6 @@ sha256 = "1c8rqg5i2hz3snmq7s41yar1zjnzilb0fyiyhkg83v97afcfx79v"; }; } - { - goPackagePath = "github.com/openzipkin/zipkin-go"; - fetch = { - type = "git"; - url = "https://github.com/openzipkin/zipkin-go"; - rev = "v0.1.6"; - sha256 = "0fyf69w66khj3dxdpqydwjdhhhyhlh3caxa5ybnd1h2f6b5gbvvv"; - }; - } { goPackagePath = "github.com/pierrec/lz4"; fetch = { diff --git a/runtime-components/non-repudiation-testing/src/main/scala/com/daml/nonrepudiation/testing/package.scala b/runtime-components/non-repudiation-testing/src/main/scala/com/daml/nonrepudiation/testing/package.scala index 69393c41940e..a82173233a52 100644 --- a/runtime-components/non-repudiation-testing/src/main/scala/com/daml/nonrepudiation/testing/package.scala +++ b/runtime-components/non-repudiation-testing/src/main/scala/com/daml/nonrepudiation/testing/package.scala @@ -69,8 +69,7 @@ package object testing { deduplicationTime = Some(Duration(seconds = 1.day.toSeconds)), minLedgerTimeRel = Some(Duration(seconds = 1.minute.toSeconds)), ) - ), - traceContext = None, + ) ) }