diff --git a/README.md b/README.md index 3e3e5ee..199161f 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Generate CloudWatch Metrics embedded within structured log events. The embedded - Easily generate custom metrics from Lambda functions without requiring custom batching code, making blocking network requests or relying on 3rd party software. - Other compute environments (EC2, On-prem, ECS, EKS, and other container environments) are supported by installing the [CloudWatch Agent](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Generation_CloudWatch_Agent.html). + - Examples can be found in [examples/README.md](examples/README.md) - **Linking metrics to high cardinality context** diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..493bf86 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,49 @@ +# Examples + +## Docker + +With Docker images, using the `awslogs` log driver will send your container logs to CloudWatch Logs. All you have to do is write to STDOUT and your EMF logs will be processed. + +[Official Docker documentation for `awslogs` driver](https://docs.docker.com/config/containers/logging/awslogs/) + +## ECS and Fargate + +With ECS and Fargate, you can use the `awslogs` log driver to have your logs sent to CloudWatch Logs on your behalf. After configuring your task to use the `awslogs` log driver, you may write your EMF logs to STDOUT and they will be processed. + +[ECS documentation on `awslogs` log driver](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) + +## Fluent Bit and Fluentd + +Fluent Bit can be used to collect logs and push them to CloudWatch Logs. After configuring the Amazon CloudWatch Logs output plugin, you may write your EMF logs to STDOUT and they will be processed. + +[Getting Started with Fluent Bit](https://docs.fluentbit.io/manual/installation/getting-started-with-fluent-bit) + +[Amazon CloudWatch output plugin for Fluent Bit](https://docs.fluentbit.io/manual/pipeline/outputs/cloudwatch) + +### Example Metrics + +```json +{ + "_aws": { + "Timestamp": 1583902595342, + "CloudWatchMetrics": [ + { + "Dimensions": [[ "ServiceName", "ServiceType" ]], + "Metrics": [{ "Name": "ProcessingTime", "Unit": "Milliseconds" }], + "Namespace": "aws-embedded-metrics" + } + ] + }, + "ServiceName": "example", + "ServiceType": "AWS::ECS::Container", + "Method": "GET", + "Url": "/test", + "containerId": "702e4bcf1345", + "createdAt": "2020-03-11T04:54:24.981207801Z", + "startedAt": "2020-03-11T04:54:25.594413051Z", + "image": ".dkr.ecr..amazonaws.com/emf-examples:latest", + "cluster": "emf-example", + "taskArn": "arn:aws:ecs:::task/2fe946f6-8a2e-41a4-8fec-c4983bad8f74", + "ProcessingTime": 5 +} +``` diff --git a/techstack.md b/techstack.md new file mode 100644 index 0000000..401c655 --- /dev/null +++ b/techstack.md @@ -0,0 +1,127 @@ + +
+ +# Tech Stack File +![](https://img.stackshare.io/repo.svg "repo") [gordonpn/aws-embedded-metrics-python](https://github.com/gordonpn/aws-embedded-metrics-python)![](https://img.stackshare.io/public_badge.svg "public") +

+|8
Tools used|02/29/24
Report generated| +|------|------| +
+ +## Languages (1) + + + + +
+ Python +
+ Python +
+ +
+ +## Frameworks (1) + + + + +
+ Node.js +
+ Node.js +
+ +
+ +## DevOps (3) + + + + + + + + +
+ Docker +
+ Docker +
+ +
+ Git +
+ Git +
+ +
+ PyPI +
+ PyPI +
+ +
+ +## Other (2) + + + + + + +
+ Debian +
+ Debian +
+ +
+ Shell +
+ Shell +
+ +
+ + +## Open source packages (1) + +## PyPI (1) + +|NAME|VERSION|LAST UPDATED|LAST UPDATED BY|LICENSE|VULNERABILITIES| +|:------|:------|:------|:------|:------|:------| +|[aiohttp](https://pypi.org/project/aiohttp)|N/A|11/04/19|Jared Nance |Apache-2.0|N/A| + +
+
+ +Generated via [Stack File](https://github.com/marketplace/stack-file) diff --git a/techstack.yml b/techstack.yml new file mode 100644 index 0000000..eb33a74 --- /dev/null +++ b/techstack.yml @@ -0,0 +1,103 @@ +repo_name: gordonpn/aws-embedded-metrics-python +report_id: 5573201c257a07dc82fe2247ca315028 +version: 0.1 +repo_type: Public +timestamp: '2024-02-29T18:01:57+00:00' +requested_by: gordonpn +provider: github +branch: master +detected_tools_count: 8 +tools: +- name: Python + description: A clear and powerful object-oriented programming language, comparable + to Perl, Ruby, Scheme, or Java. + website_url: https://www.python.org + open_source: true + hosted_saas: false + category: Languages & Frameworks + sub_category: Languages + image_url: https://img.stackshare.io/service/993/pUBY5pVj.png + detection_source_url: https://github.com/gordonpn/aws-embedded-metrics-python + detection_source: Repo Metadata +- name: Node.js + description: A platform built on Chrome's JavaScript runtime for easily building + fast, scalable network applications + website_url: http://nodejs.org/ + open_source: true + hosted_saas: false + category: Languages & Frameworks + sub_category: Frameworks (Full Stack) + image_url: https://img.stackshare.io/service/1011/n1JRsFeB_400x400.png + detection_source_url: https://github.com/gordonpn/aws-embedded-metrics-python/blob/master/examples/ec2/metadata-endpoint/Dockerfile + detection_source: examples/ec2/metadata-endpoint/Dockerfile + last_updated_by: Jared Nance + last_updated_on: 2019-11-04 05:44:56.000000000 Z +- name: Docker + description: Enterprise Container Platform for High-Velocity Innovation. + website_url: https://www.docker.com/ + license: Apache-2.0 + open_source: true + hosted_saas: false + category: Build, Test, Deploy + sub_category: Virtual Machine Platforms & Containers + image_url: https://img.stackshare.io/service/586/n4u37v9t_400x400.png + detection_source_url: https://github.com/gordonpn/aws-embedded-metrics-python + detection_source: Repo Metadata +- name: Git + description: Fast, scalable, distributed revision control system + website_url: http://git-scm.com/ + open_source: true + hosted_saas: false + category: Build, Test, Deploy + sub_category: Version Control System + image_url: https://img.stackshare.io/service/1046/git.png + detection_source_url: https://github.com/gordonpn/aws-embedded-metrics-python + detection_source: Repo Metadata +- name: PyPI + description: A repository of software for the Python programming language + website_url: https://pypi.org/ + open_source: false + hosted_saas: false + category: Build, Test, Deploy + sub_category: Hosted Package Repository + image_url: https://img.stackshare.io/service/12572/-RIWgodF_400x400.jpg + detection_source_url: https://github.com/gordonpn/aws-embedded-metrics-python/blob/master/setup.py + detection_source: setup.py + last_updated_by: Jared Nance + last_updated_on: 2019-10-24 20:12:21.000000000 Z +- name: Debian + description: The Universal Operating System + website_url: https://www.debian.org/ + open_source: false + hosted_saas: false + category: Languages & Frameworks + sub_category: Operating Systems + image_url: https://img.stackshare.io/service/1656/vd4gAekh.png + detection_source_url: https://github.com/gordonpn/aws-embedded-metrics-python/blob/master/tests/integ/agent/Dockerfile + detection_source: tests/integ/agent/Dockerfile + last_updated_by: Jared Nance + last_updated_on: 2020-08-28 15:10:24.000000000 Z +- name: Shell + description: A shell is a text-based terminal, used for manipulating programs and + files. Shell scripts typically manage program execution. + website_url: https://en.wikipedia.org/wiki/Shell_script + open_source: false + hosted_saas: false + category: Languages & Frameworks + sub_category: Languages + image_url: https://img.stackshare.io/service/4631/default_c2062d40130562bdc836c13dbca02d318205a962.png + detection_source_url: https://github.com/gordonpn/aws-embedded-metrics-python + detection_source: Repo Metadata +- name: aiohttp + description: Async http client/server framework + package_url: https://pypi.org/project/aiohttp + license: Apache-2.0 + open_source: true + hosted_saas: false + category: Libraries + sub_category: PyPI Packages + image_url: https://img.stackshare.io/package/19852/default_d748224707283d9d8a73c2323730c87bda6b313a.png + detection_source_url: https://github.com/gordonpn/aws-embedded-metrics-python/blob/master/setup.py + detection_source: setup.py + last_updated_by: Jared Nance + last_updated_on: 2019-11-04 00:32:59.000000000 Z