Skip to content

Pass nocurls as additional info to Viewer for latency tracking.#7709

Merged
lannka merged 8 commits intoampproject:masterfrom
lannka:curls-exp
Feb 22, 2017
Merged

Pass nocurls as additional info to Viewer for latency tracking.#7709
lannka merged 8 commits intoampproject:masterfrom
lannka:curls-exp

Conversation

@lannka
Copy link
Copy Markdown
Contributor

@lannka lannka commented Feb 22, 2017

No description provided.

Copy link
Copy Markdown
Member

@cramforce cramforce left a comment

Choose a reason for hiding this comment

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

Can this be tested?

return this.enabledExperiments_;
}
const experiments = [];
if (this.win.location.hostname == 'cdn.ampproject.org') {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are you sending a similar CL for "was-prerendered"?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why hard coding cdn.ampproject.org

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No reason, good catch.

Do you have some kind of filter for catching this? :)

We should add a presubmit check for this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dknecht this is for our own tracking, so we can slice the traffic from cdn.ampproject.org.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Useful for others.
config.urls.cdn should help

Copy link
Copy Markdown
Contributor

@dknecht dknecht Feb 22, 2017

Choose a reason for hiding this comment

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

@cramforce yeah gmail filter. Not very accurate.

@erwinmombay has mentioned a presubmit check also.

@lannka
Copy link
Copy Markdown
Contributor Author

lannka commented Feb 22, 2017

@cramforce comment addressed. PTAL
As for prerender, still debating if we should go for "action" solution

Copy link
Copy Markdown
Member

@cramforce cramforce left a comment

Choose a reason for hiding this comment

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

LG, but please add comment for what is going on.

return this.enabledExperiments_;
}
const experiments = [];
if (this.getHostname_() == urls.cdn.split('://')[1]) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add comment here.

const experiments = [];
// Check if it's the legacy CDN domain.
if (this.getHostname_() == urls.cdn.split('://')[1]) {
experiments.push('nocurls');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lets pick a name that makes sense like legacy-cdn-domain

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

const experiments = [];
// Check if it's the legacy CDN domain.
if (this.getHostname_() == urls.cdn.split('://')[1]) {
experiments.push('legacy-cdn-domain');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we list these "experiments" down somewhere, hard to track down at some point

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i planned to have all experiments coded in this method. we shouldn't have too many simultaneously, since they quickly take URL length.

if we really get a handful experiments running, we can find other way to manage them. how does that sound?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sgtm

@lannka lannka merged commit 42a93cc into ampproject:master Feb 22, 2017
@lannka lannka deleted the curls-exp branch February 22, 2017 19:05
}
const experiments = [];
// Check if it's the legacy CDN domain.
if (this.getHostname_() == urls.cdn.split('://')[1]) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

parseUrl, please.

aghassemi pushed a commit that referenced this pull request Mar 15, 2017
* Pass nocurls as additional info to Viewer for latency tracking.

* Add test.

* use urls.cdn

* Add comment.

* ...

* ...

* rename experiment name

* fix test
mrjoro pushed a commit to mrjoro/amphtml that referenced this pull request Apr 28, 2017
…roject#7709)

* Pass nocurls as additional info to Viewer for latency tracking.

* Add test.

* use urls.cdn

* Add comment.

* ...

* ...

* rename experiment name

* fix test
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.

5 participants