h*[1.1.0 Safe-Inferred= Safe-Inferred"%&- opentelemetry-pluginA  ' coupled with the action to delete the   from the  . opentelemetry-pluginA concurrently accessible map that can be used to connect a module at beginning of compilation and at the end.4GHC records the phases of computation in a datatype TPhase5. This datatype begins Haskell compilation with the T_Hsc+ phase. The final phase in compilation is T_MergeForeign&. The final phase has a few items: a PipeEnv, an HscEnv, a Filepath representing the location of the object file for the module, and a list of Filepath# that I don't know the purpose of.T_Hsc phase carries a  ModSummary% type, which fortunately includes a  ms_location field which has the ml_object_file field. Since this information is present both at the beginning and end, we can use that to associate a   with a module's beginning and end, to record the full time in compilation. opentelemetry-pluginVery large Haskell builds can generate an enormous number of spans, but none of the stock samplers provide a way to sample a subset of the  s within a trace.This adds a new "spanratio" sampler which can be used to sample subset of module spans. opentelemetry-pluginLike a lot of other uses of  in this module, we're doing this because the plugin interface doesn't provide a way for us to acquire resources before returning the plugin.opentelemetry-plugin-Note: We don't properly shut this down using , but all that the shutdown does is flush metrics, so instead we flush metrics (using ) at the end of compilation to make up for the lack of a proper shutdown.opentelemetry-pluginThis used by the GHC plugin to create two plugin passes that start and stop a  , respectively. In order for  4 ancestry to be tracked correctly this takes an  ! as an input (to read the parent  's ) and returns an  # as an output (to read the current  's ).opentelemetry-plugin"We're intentionally **NOT** using  here since the 7 logic doesn't necessarily run in a single thread (ghc builds can be multi-threaded). Instead, we provide our own  global variable.opentelemetry-plugin4We keep track of the module spans in this top-level  so that it may be shared between the driverPlugin and other plugins.opentelemetry-pluginThis initializes the top-level  using the  TRACEPARENT /  TRACESTATE / BAGGAGE environment variables (if present) and otherwise sets it to the empty ,You have to run this command before calling $ otherwise the latter will hang.opentelemetry-pluginAccess the top-level  computed by opentelemetry-plugin'This is used for communicating between   and  , because only   has access to the full module graph, but there isn't a good way within the  API to share that information with the rest of the plugin other than a global variable.opentelemetry-plugin'Set the root module names (computed by  ),You have to run this command before calling $ otherwise the latter will hang.opentelemetry-plugin,Check if a module is one of the root modulesopentelemetry-pluginFlush all metricsopentelemetry-pluginReturns  if the plugin should create spans for module passes in compilation. Examples would be Simplifier, any other plugin execution, etc.opentelemetry-pluginFlush metrics if we're compiling one of the root modules. This is to work around the fact that we don't have a proper way to finalize the   (since the finalizer would normally be responsible for flushing any last metrics).You might wonder: why don't we end the top-level span here? Well, we don't know which one of the root modules will be the last one to be compiled. However, flushing once per root module is still fine because flushing is safe to run at any time and in practice there will only be a few root modules.!opentelemetry-pluginCreate a new empty  ."opentelemetry-plugin Create a   for the given  ModSummary and record it in the  .#opentelemetry-pluginGiven a   ! and a function that provides a  , this function modifies the  ( to have the parent span of the module.$opentelemetry-plugin Retrieve the   for a given   , if one has been recorded.opentelemetry-plugin#Whether to sample a subset of spansopentelemetry-plugin!Action to read the parent span's opentelemetry-pluginLabel for the current span"opentelemetry-pluginThe location of the object file for the module. This should be available through the  ModSummary via  ms_location and  ml_obj_fileopentelemetry-plugin-A string representing the name of the module.%opentelemetry-pluginThis should be either the module name *or* the object file location.# & !"% Safe-Inferred"')*-Uopentelemetry-plugin>GHC plugin that exports open telemetry metrics about the build' !"#$%&'()*+,-./01234'(56789:;<=>1opentelemetry-plugin-1.1.0-KLZERxR3NP4FSN5yp6tU09OpenTelemetry.Pluginopentelemetry-pluginPaths_opentelemetry_pluginOpenTelemetry.Plugin.SharedOpenTelemetry.Context ThreadLocal GHC.PluginsPlugin driverPlugininstallCoreToDosPluginsModuleTraceContextpluginversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDirgetDataFileName getSysconfDir SpanRelease3hs-opentelemetry-api-0.1.0.0-A4SMk0AmF5i9q9Y6muTZhl"OpenTelemetry.Internal.Trace.TypesSpanSpanMap getSampler generatorbase GHC.IO.UnsafeunsafePerformIOtracerProviderOpenTelemetry.Trace.CoreshutdownTracerProviderflushmakeWrapperPluginPassesghc-prim GHC.TypesIOOpenTelemetry.Context.TypestopLevelContextMVartopLevelSpanMapMVarGHC.MVarMVarinitializeTopLevelContextgetTopLevelContextrootModuleNamesMVarsetRootModuleNames isRootModulegetPluginShouldRecordPassesTrueflushMetricsWhenRootModuleTracerProvider newSpanMaprecordModuleStartmodifyContextWithParentSpangetSpanForModulerecordModuleEndtracer