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

drop stackdriver metrics and tracing exporters #2183

Merged
merged 8 commits into from
Jul 14, 2021

Conversation

dprotaso
Copy link
Member

@dprotaso dprotaso commented Jul 8, 2021

  • drop stackdriver as a tracing backend
  • drop stackdriver as a metrics backend
  • update deps - dropping stackdriver

Fixes: #2173

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 8, 2021
@knative-prow-robot knative-prow-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 8, 2021
@codecov
Copy link

codecov bot commented Jul 8, 2021

Codecov Report

Merging #2183 (d85ea54) into main (51cfaab) will increase coverage by 0.06%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2183      +/-   ##
==========================================
+ Coverage   66.05%   66.11%   +0.06%     
==========================================
  Files         224      221       -3     
  Lines        9426     9259     -167     
==========================================
- Hits         6226     6122     -104     
+ Misses       2920     2862      -58     
+ Partials      280      275       -5     
Impacted Files Coverage Δ
metrics/config_observability.go 92.00% <ø> (ø)
source/source_stats_reporter.go 84.90% <ø> (ø)
test/spoof/error_checks.go 76.92% <0.00%> (-6.42%) ⬇️
test/spoof/spoof.go 48.43% <0.00%> (+48.43%) ⬆️
tracing/opencensus.go 46.26% <ø> (+3.21%) ⬆️
metrics/config.go 77.77% <100.00%> (-4.47%) ⬇️
metrics/exporter.go 84.09% <100.00%> (-0.53%) ⬇️
tracing/config/tracing.go 80.76% <100.00%> (+5.76%) ⬆️
metrics/resource_view.go 86.93% <0.00%> (-1.71%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe90576...d85ea54. Read the comment docs.

@dprotaso
Copy link
Member Author

dprotaso commented Jul 8, 2021

/hold - going to wait till next week in case there's some commentary on the issue

/assign @evankanderson @skonto

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 8, 2021
@dprotaso
Copy link
Member Author

/hold cancel

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 12, 2021
customSubDomain = "test.domain"
testProj = "test-project"
anotherProj = "another-project"
metricsDomain = "knative.dev/project"
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the value of having different domains?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was a stack driver thing but we're actually prefixing this to the open census metric names so I think this should keep this around until we resolve: #2174

I think there's some value in repurposing this as a label in order to help disambiguate between components across different Knative projects (ie. serving vs eventing).

ie. in the future we drop the metric prefix and thus require labels to help segment metrics.

So for a golang memory metric - we'd have a component label ie. controller and reuse the domain label serving

I'm ok to drop this domain if an alternative exists - ie. if the components namespace is automatically picked up as part of the metric

Copy link
Member

Choose a reason for hiding this comment

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

I think the namespace is likely to be picked up as part of the metric; I'm not sure if we have to / want to worry about cases like queue-proxies and sources running in a user's namespace.

I'm inclined to think that namespace + some sort of component/Resource name should be sufficient here, but I might be mistaken.

Copy link
Member

Choose a reason for hiding this comment

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

(With the notion that the Resource would indicate whether it was a serving or eventing construct if it was running in a user namespace, and that multi-tenant components would be running in a namespace where the name would give a clue.)

The obvious counter-example here is mink, where all the controllers are bundled into a single Pod, but I'm not sure that's a compelling enough case.

@skonto
Copy link
Contributor

skonto commented Jul 12, 2021

@dprotaso I still see some references to the stackdriver name like here:

loggingCfg := stackdriverConfig()

Shouldn't we remove it from the whole codebase? There are more from a quick search, detected via the IDE.

@dprotaso
Copy link
Member Author

re:

loggingCfg := stackdriverConfig() 

This just produces a logging format that stackdriver can parse easily - I'm ok with leaving this since it helps debugging with our CI/prow runs.

Do you have suggestions on other alternatives here?

@skonto
Copy link
Contributor

skonto commented Jul 12, 2021

Do you have suggestions on other alternatives here?

I can do a followup PR to cleanup anything that remains and discuss them in detail one by one. For that particular logging config func I would just rename it, if it does not do any harm.

@dprotaso
Copy link
Member Author

/hold

I'll fix the downstream serving issues

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 12, 2021
@dprotaso
Copy link
Member Author

Downstream issue should be resolved here:
knative/serving#11659

@dprotaso
Copy link
Member Author

Moving Eventing Source StatReporter out of knative.dev/pkg - knative/eventing#5587

these have been moved to their respective repos
see: knative#608
We're going to move the StatsReporter downstream eventually

related:
knative/eventing#5587
knative/eventing#5586
@dprotaso
Copy link
Member Author

dprotaso commented Jul 14, 2021

I'm going to temporarily move the eventing sources metric keys to pkg/source until we can move the stats reporter into the eventing repo. That's sometime I'm working on now

@dprotaso
Copy link
Member Author

last PR to fix serving downstream: knative/serving#11679

@dprotaso
Copy link
Member Author

/hold cancel - this is good now

@dprotaso
Copy link
Member Author

/hold cancel

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 14, 2021
Copy link
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

I'm amused that we're deleting about 10k lines of aws-sdk-go with this change. (Also, wow the generated proto files stackdriver pulled in were big...)

// RequestMetricsBackend specifies the request metrics destination, e.g. Prometheus,
// Stackdriver. "None" disables all backends.
// RequestMetricsBackend specifies the request metrics destination, e.g. Prometheus.
// "None" disables all backends.
Copy link
Member

Choose a reason for hiding this comment

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

Should this have OpenCensus?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add it back

customSubDomain = "test.domain"
testProj = "test-project"
anotherProj = "another-project"
metricsDomain = "knative.dev/project"
Copy link
Member

Choose a reason for hiding this comment

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

I think the namespace is likely to be picked up as part of the metric; I'm not sure if we have to / want to worry about cases like queue-proxies and sources running in a user's namespace.

I'm inclined to think that namespace + some sort of component/Resource name should be sufficient here, but I might be mistaken.

customSubDomain = "test.domain"
testProj = "test-project"
anotherProj = "another-project"
metricsDomain = "knative.dev/project"
Copy link
Member

Choose a reason for hiding this comment

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

(With the notion that the Resource would indicate whether it was a serving or eventing construct if it was running in a user namespace, and that multi-tenant components would be running in a namespace where the name would give a clue.)

The obvious counter-example here is mink, where all the controllers are bundled into a single Pod, but I'm not sure that's a compelling enough case.

metrics/config_test.go Show resolved Hide resolved
@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, evankanderson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [dprotaso,evankanderson]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot merged commit aff7376 into knative:main Jul 14, 2021
@dprotaso dprotaso deleted the no-stack-driver branch July 14, 2021 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove stack driver exporter
4 participants