Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurations of OpenTelemetryCollector and AMP Rules for AmpAddOn #801

Merged

Conversation

freschri
Copy link
Collaborator

@freschri freschri commented Aug 2, 2023

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@freschri This is awesome work, appreciate the work here. Have few comments and questions. I love the approach.

ampRules: {
ampWorkspaceArn: ampWorkspaceArn,
ruleFilePaths: [
__dirname + '/../common/resources/amp-config/alerting-rules.yml',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add couple of statements to say these files should be located in the code repo which is using the Addon. Also please share couple of sample alerting and recording rules underneath and point to some link for references which people can use to setup.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

.build(app, 'my-stack-name');
```

Pattern # 6 : Configuring the [AWS Distro for OpenTelemetry Collector](https://aws-otel.github.io/docs/getting-started/collector). This pattern enables you to configure the Collector by providing a manifest describing an OpenTelemetryCollector resource:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space after a manifest. Also can you explain a little bit more clearly about this pattern. The explanation is not clear may be focus a bit on usecase.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

name?: string;
name?: string;
/**
* AMP rules.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elaborate. Do we have any defaults?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

test/amp.test.ts Outdated
expect(blueprint).toBeDefined();
});

test("Stack creation fails due to missing AdotCollectorAddOn", () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this test is not required because we have a dependency with ADOT Addon in AmpAddon. But if you prefer to keep it im good.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

const manifest = doc.split("---").map(e => {
let object = loadYaml(e);

if (this.ampAddOnProps.openTelemetryCollectorManifestPath !== undefined && object.kind === "OpenTelemetryCollector"){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intention here is to overwrite the yaml doc from collector-config-amp.ytpl to openTelemetryCollectorManifestPath is passed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct (or collector-config-amp-daemonset.ytpl)

lib/addons/amp/index.ts Show resolved Hide resolved
elamaran11
elamaran11 previously approved these changes Aug 2, 2023
Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @shapirov103 Could you please review and run e2e

@elamaran11
Copy link
Collaborator

@freschri Check for lint errors

Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@freschri Great work, very minor comments/nits.

The failure of the doc checker should be addressed because otherwise it will require us an exclusion. Do you mind adding http://console-eks.yourdomain.com/ to the .github/workflows/linkcheck.json (ingorePatterns)

docs/addons/amp-addon.md Outdated Show resolved Hide resolved
docs/addons/amp-addon.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shapirov103 shapirov103 merged commit 9ebc122 into aws-quickstart:main Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants