Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Update Proxy heartbeat & logging #502

Merged
merged 6 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/agent/onefuzz-telemetry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ pub enum EventData {
CoveragePathsImported(u64),
CoverageMaxDepth(u64),
ToolName(String),
Region(String),
}

impl EventData {
Expand Down Expand Up @@ -109,6 +110,7 @@ impl EventData {
Self::CoverageMaxDepth(x) => ("coverage_paths_depth", x.to_string()),
Self::Coverage(x) => ("coverage", x.to_string()),
Self::ToolName(x) => ("tool_name", x.to_owned()),
Self::Region(x) => ("region", x.to_owned()),
}
}

Expand Down Expand Up @@ -146,6 +148,7 @@ impl EventData {
Self::CoverageMaxDepth(_) => true,
Self::Coverage(_) => true,
Self::ToolName(_) => true,
Self::Region(_) => false,
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/api-service/__app__/onefuzzlib/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import datetime
import logging
import os
from typing import List, Optional, Tuple

from azure.mgmt.compute.models import VirtualMachine
Expand All @@ -23,6 +24,7 @@
from .__version__ import __version__
from .azure.auth import build_auth
from .azure.containers import get_file_sas_url, save_blob
from .azure.creds import get_instance_id
from .azure.ip import get_public_ip
from .azure.queue import get_queue_sas
from .azure.storage import StorageType
Expand Down Expand Up @@ -211,6 +213,9 @@ def save_proxy_config(self) -> None:
),
forwards=forwards,
region=self.region,
instrumentation_key=os.environ.get("APPINSIGHTS_INSTRUMENTATIONKEY"),
telemetry_key=os.environ.get("ONEFUZZ_TELEMETRY"),
instance_id=get_instance_id(),
)

save_blob(
Expand Down
Loading