Add metric instrumentation for WSGI (#1128)

This commit is contained in:
Srikanth Chekuri
2022-06-22 03:54:05 +05:30
committed by GitHub
parent 6503cdf2fe
commit 0007c9046c
12 changed files with 191 additions and 90 deletions

View File

@ -23,8 +23,8 @@ logger = logging.getLogger("instrumentation_readme_generator")
_prefix = "opentelemetry-instrumentation-"
header = """
| Instrumentation | Supported Packages |
| --------------- | ------------------ |"""
| Instrumentation | Supported Packages | Metrics support |
| --------------- | ------------------ | --------------- |"""
def main():
@ -62,11 +62,14 @@ def main():
exec(fh.read(), pkg_info)
instruments = pkg_info["_instruments"]
supports_metrics = pkg_info.get("_supports_metrics")
if not instruments:
instruments = (name,)
metric_column = "Yes" if supports_metrics else "No"
table.append(
f"| [{instrumentation}](./{instrumentation}) | {','.join(instruments)} |"
f"| [{instrumentation}](./{instrumentation}) | {','.join(instruments)} | {metric_column}"
)
with open(