...
- heartbeat: https://github.com/onap/dcaegen2-services-heartbeat/tree/master/miss_htbt_service
- pm-service-handler: https://github.com/onap/dcaegen2-services/tree/master/components/pm-subscription-handler/pmsh_service/mod
- smnptrap: https://github.com/onap/dcaegen2-collectors-snmptrap/tree/master/snmptrap
Interesting Functions
There is an interesting function in https://github.com/onap/dcaegen2-services/blob/master/components/pm-subscription-handler/pmsh_service/mod/__init__.py lines 39 - 50
def mdc_handler(func):
@wraps(func)
def wrapper(*args, **kwargs):
request_id = str(uuid.uuid1())
invocation_id = str(uuid.uuid1())
MDC.put('ServiceName', getenv('HOSTNAME'))
MDC.put('RequestID', request_id)
MDC.put('InvocationID', invocation_id)
kwargs['request_id'] = request_id
kwargs['invocation_id'] = invocation_id
return func(*args, **kwargs)