@@ -495,25 +495,9 @@ def _import_opamp() -> callable[[...], None]:
495495 # this in development, at the moment we are looking for a callable that takes
496496 # the resource and instantiate an OpAMP agent.
497497 # Since configuration is not specified every implementors may have its own.
498- # OpAMPAgent and OpAMPClient will be contributed once I finish writing tests :)
499- # def opamp_init(resource: Resource):
500- # endpoint = os.environ.get("OTEL_PYTHON_OPAMP_ENDPOINT")
501- # if endpoint:
502- # opamp_client = OpAMPClient(
503- # endpoint=endpoint,
504- # agent_identifying_attributes={
505- # "service.name": resource.get("service.name"),
506- # "deployment.environment.name": resource.get("deployment.environment.name"),
507- # },
508- # )
509- # opamp_agent = OpAMPAgent(
510- # interval=30,
511- # handler=opamp_handler, # this is an handler that gets called to process each OpAMP message
512- # client=opamp_client,
513- # )
514- # opamp_agent.start()
498+ # Refer to opentelemetry-opamp-client package on how to setup the OpAMP agent.
515499 _ , opamp_init_func = _import_config_components (
516- ["_init_func " ], "_opentelemetry_opamp"
500+ ["init_function " ], "_opentelemetry_opamp"
517501 )[0 ]
518502
519503 return opamp_init_func
@@ -575,11 +559,7 @@ def _initialize_components(
575559 # This is different than other init helpers because setting up OpAMP requires distro
576560 # provided code as it's not strictly specified. We call OpAMP init before other code
577561 # because people may want to have it blocking to get an updated config before setting
578- # up the rest. Content of OpAMP config depends on the implementor and vendors will
579- # have their own. OpAMP to be fully integrated will need to introduce the concept of a
580- # config so we can track the difference between current config and a newly provided remote
581- # config. The goal is to have configuration updated dynamically while our SDK config is
582- # currently static.
562+ # up the rest.
583563 try :
584564 _init_opamp = _import_opamp ()
585565 _init_opamp (resource = resource )
0 commit comments