Skip to content

Commit

Permalink
Revert "feat(otel): adding in basic tracing via otel (#794)" (#797)
Browse files Browse the repository at this point in the history
This reverts commit 9e5cd93.
  • Loading branch information
bassrock authored Oct 7, 2024
1 parent 9e5cd93 commit 59af83e
Show file tree
Hide file tree
Showing 39 changed files with 721 additions and 1,506 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/docker-images.yml

This file was deleted.

22 changes: 0 additions & 22 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,25 +96,3 @@ services:
retries: 30
ports:
- '9090:9090'

otlpcollector:
image: grafana/otel-lgtm
ports:
# there are lots more ports available, but these are the only one's
# currently being used
- 4317:4317 # OTLP gRPC receiver
- 4318:4318 # OTLP http receiver
- 3000:3000 # Grafana

# Uncomment this if you want to run the collector locally and send to GCP instead of the one used for local development
# Make sure to have a service json in GOOGLE_APPLICATION_CREDENTIALS_JSON in the .env file
# otlpcollector:
# image: pocket/opentelemetry-collector-contrib
# env_file:
# - .env
# ports:
# # there are lots more ports available, but these are the only one's
# # currently being used
# - 4317:4317 # OTLP gRPC receiver
# - 4318:4318 # OTLP http receiver
# - 3000:3000 # Grafana
17 changes: 0 additions & 17 deletions images/otel/Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions images/otel/entrypoint.sh

This file was deleted.

63 changes: 0 additions & 63 deletions images/otel/otel-collector-config.yaml

This file was deleted.

48 changes: 13 additions & 35 deletions infrastructure/client-api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,40 +266,6 @@ class ClientAPI extends TerraformStack {
startPeriod: 0,
},
},
{
name: 'otel-collector',
containerImage: 'pocket/opentelemetry-collector-contrib',
essential: true,
logMultilinePattern: '^\\S.+',
logGroup: this.createCustomLogGroup('otel-collector'),
portMappings: [
{
hostPort: 4138,
containerPort: 4138,
},
{
hostPort: 4137,
containerPort: 4137,
},
{
hostPort: 55681,
containerPort: 55681,
},
],
envVars: [
{
name: 'DEPLOYMENT_ENVIRONMENT_NAME',
value: config.tags.env_code,
},
],
secretEnvVars: [
{
name: 'GOOGLE_APPLICATION_CREDENTIALS_JSON',
valueFrom: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/GCP_SA_TRACES:::`,
},
],
repositoryCredentialsParam: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/DockerHub`,
},
],
codeDeploy: {
useCodeDeploy: true,
Expand Down Expand Up @@ -343,7 +309,19 @@ class ClientAPI extends TerraformStack {
effect: 'Allow',
},
],
taskRolePolicyStatements: [],
taskRolePolicyStatements: [
{
actions: [
'xray:PutTraceSegments',
'xray:PutTelemetryRecords',
'xray:GetSamplingRules',
'xray:GetSamplingTargets',
'xray:GetSamplingStatisticSummaries',
],
resources: ['*'],
effect: 'Allow',
},
],
taskExecutionDefaultAttachmentArn:
'arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy',
},
Expand Down
39 changes: 5 additions & 34 deletions infrastructure/list-api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,40 +304,6 @@ class ListAPI extends TerraformStack {
logGroup: this.createCustomLogGroup('app'),
logMultilinePattern: '^\\S.+',
},
{
name: 'otel-collector',
containerImage: 'pocket/opentelemetry-collector-contrib',
essential: true,
logMultilinePattern: '^\\S.+',
logGroup: this.createCustomLogGroup('otel-collector'),
portMappings: [
{
hostPort: 4138,
containerPort: 4138,
},
{
hostPort: 4137,
containerPort: 4137,
},
{
hostPort: 55681,
containerPort: 55681,
},
],
envVars: [
{
name: 'DEPLOYMENT_ENVIRONMENT_NAME',
value: config.tags.env_code,
},
],
secretEnvVars: [
{
name: 'GOOGLE_APPLICATION_CREDENTIALS_JSON',
valueFrom: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/GCP_SA_TRACES:::`,
},
],
repositoryCredentialsParam: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/DockerHub`,
},
],
codeDeploy: {
useCodeDeploy: true,
Expand Down Expand Up @@ -383,6 +349,11 @@ class ListAPI extends TerraformStack {
'logs:CreateLogStream',
'logs:DescribeLogStreams',
'logs:DescribeLogGroups',
'xray:PutTraceSegments',
'xray:PutTelemetryRecords',
'xray:GetSamplingRules',
'xray:GetSamplingTargets',
'xray:GetSamplingStatisticSummaries',
],
resources: ['*'],
effect: 'Allow',
Expand Down
39 changes: 5 additions & 34 deletions infrastructure/parser-graphql-wrapper/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,40 +278,6 @@ class ParserGraphQLWrapper extends TerraformStack {
},
],
},
{
name: 'otel-collector',
containerImage: 'pocket/opentelemetry-collector-contrib',
essential: true,
logMultilinePattern: '^\\S.+',
logGroup: this.createCustomLogGroup('otel-collector'),
portMappings: [
{
hostPort: 4138,
containerPort: 4138,
},
{
hostPort: 4137,
containerPort: 4137,
},
{
hostPort: 55681,
containerPort: 55681,
},
],
envVars: [
{
name: 'DEPLOYMENT_ENVIRONMENT_NAME',
value: config.tags.env_code,
},
],
secretEnvVars: [
{
name: 'GOOGLE_APPLICATION_CREDENTIALS_JSON',
valueFrom: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/GCP_SA_TRACES`,
},
],
repositoryCredentialsParam: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/DockerHub`,
},
],
codeDeploy: {
useCodeDeploy: true,
Expand Down Expand Up @@ -360,6 +326,11 @@ class ParserGraphQLWrapper extends TerraformStack {
'logs:CreateLogStream',
'logs:DescribeLogStreams',
'logs:DescribeLogGroups',
'xray:PutTraceSegments',
'xray:PutTelemetryRecords',
'xray:GetSamplingRules',
'xray:GetSamplingTargets',
'xray:GetSamplingStatisticSummaries',
],
resources: ['*'],
effect: 'Allow',
Expand Down
49 changes: 5 additions & 44 deletions infrastructure/user-api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,52 +186,10 @@ class UserAPI extends TerraformStack {
name: 'SALT_2',
valueFrom: `${intMaskSecretArn}:salt2::`,
},
{
name: 'UNLEASH_ENDPOINT',
valueFrom: `arn:aws:ssm:${region.name}:${caller.accountId}:parameter/Shared/${config.environment}/UNLEASH_ENDPOINT`,
},
{
name: 'UNLEASH_KEY',
valueFrom: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:${config.name}/${config.environment}/UNLEASH_KEY`,
},
],
logGroup: this.createCustomLogGroup('app'),
logMultilinePattern: '^\\S.+',
},
{
name: 'otel-collector',
containerImage: 'pocket/opentelemetry-collector-contrib',
essential: true,
logMultilinePattern: '^\\S.+',
logGroup: this.createCustomLogGroup('otel-collector'),
portMappings: [
{
hostPort: 4138,
containerPort: 4138,
},
{
hostPort: 4137,
containerPort: 4137,
},
{
hostPort: 55681,
containerPort: 55681,
},
],
envVars: [
{
name: 'DEPLOYMENT_ENVIRONMENT_NAME',
value: config.tags.env_code,
},
],
secretEnvVars: [
{
name: 'GOOGLE_APPLICATION_CREDENTIALS_JSON',
valueFrom: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/GCP_SA_TRACES:::`,
},
],
repositoryCredentialsParam: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/DockerHub`,
},
],
codeDeploy: {
useCodeDeploy: true,
Expand Down Expand Up @@ -274,8 +232,6 @@ class UserAPI extends TerraformStack {
resources: [
`arn:aws:ssm:${region.name}:${caller.accountId}:parameter/${config.name}/${config.environment}`,
`arn:aws:ssm:${region.name}:${caller.accountId}:parameter/${config.name}/${config.environment}/*`,
`arn:aws:ssm:${region.name}:${caller.accountId}:parameter/Shared/${config.environment}/*`,
`arn:aws:ssm:${region.name}:${caller.accountId}:parameter/Shared/${config.environment}`,
],
effect: 'Allow',
},
Expand All @@ -288,6 +244,11 @@ class UserAPI extends TerraformStack {
'logs:CreateLogStream',
'logs:DescribeLogStreams',
'logs:DescribeLogGroups',
'xray:PutTraceSegments',
'xray:PutTelemetryRecords',
'xray:GetSamplingRules',
'xray:GetSamplingTargets',
'xray:GetSamplingStatisticSummaries',
],
resources: ['*'],
effect: 'Allow',
Expand Down
Loading

0 comments on commit 59af83e

Please sign in to comment.