mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 20:08:09 +00:00
add the instrumentation key to Info (#353)
This commit is contained in:
@ -10,6 +10,7 @@ from ..onefuzzlib.azure.creds import (
|
|||||||
get_base_region,
|
get_base_region,
|
||||||
get_base_resource_group,
|
get_base_resource_group,
|
||||||
get_insights_appid,
|
get_insights_appid,
|
||||||
|
get_insights_instrumentation_key,
|
||||||
get_instance_id,
|
get_instance_id,
|
||||||
get_subscription,
|
get_subscription,
|
||||||
)
|
)
|
||||||
@ -26,5 +27,6 @@ def main(req: func.HttpRequest) -> func.HttpResponse:
|
|||||||
versions=versions(),
|
versions=versions(),
|
||||||
instance_id=get_instance_id(),
|
instance_id=get_instance_id(),
|
||||||
insights_appid=get_insights_appid(),
|
insights_appid=get_insights_appid(),
|
||||||
|
insights_instrumentation_key=get_insights_instrumentation_key(),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -82,6 +82,11 @@ def get_subscription() -> Any: # should be str
|
|||||||
return parse_resource_id(os.environ["ONEFUZZ_DATA_STORAGE"])["subscription"]
|
return parse_resource_id(os.environ["ONEFUZZ_DATA_STORAGE"])["subscription"]
|
||||||
|
|
||||||
|
|
||||||
|
@cached
|
||||||
|
def get_insights_instrumentation_key() -> Any: # should be str
|
||||||
|
return os.environ["ONEFUZZ_TELEMETRY"]
|
||||||
|
|
||||||
|
|
||||||
@cached
|
@cached
|
||||||
def get_insights_appid() -> str:
|
def get_insights_appid() -> str:
|
||||||
return os.environ["APPINSIGHTS_APPID"]
|
return os.environ["APPINSIGHTS_APPID"]
|
||||||
|
@ -38,6 +38,7 @@ class Info(BaseResponse):
|
|||||||
versions: Dict[str, Version]
|
versions: Dict[str, Version]
|
||||||
instance_id: Optional[UUID]
|
instance_id: Optional[UUID]
|
||||||
insights_appid: Optional[str]
|
insights_appid: Optional[str]
|
||||||
|
insights_instrumentation_key: Optional[str]
|
||||||
|
|
||||||
|
|
||||||
class ContainerInfoBase(BaseResponse):
|
class ContainerInfoBase(BaseResponse):
|
||||||
|
Reference in New Issue
Block a user