GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — logging: change resource argument to metadata by stephenplusplus · Pull Request #1666 · googleapis/google-cloud-node

Conversation

@stephenplusplus

@stephenplusplus stephenplusplus commented Oct 3, 2016

Copy link
Copy Markdown
Contributor

Fixes #1348

Before

var resource = {
  type: 'gce_instance',
  labels: {
    zone: 'global',
    instance_id: '3'
  }
}

var entry = log.entry(resource, data)
entry.otherMetadataProperty = '...' // <- not documented this way, because it wasn't intended to be done this way

After

var metadata = {
  otherMetadataProperty: '...', // <- logical place for this
  resource: {
    type: 'gce_instance',
    labels: {
      zone: 'global',
      instance_id: '3'
    }
  }
}

var entry = log.entry(metadata, data)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 3, 2016
@stephenplusplus stephenplusplus added the api: logging Issues related to the Cloud Logging API. label Oct 3, 2016
@stephenplusplus

stephenplusplus commented Oct 3, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@zbjornson mind taking a quick look? Thanks for the idea!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

zbjornson
zbjornson reviewed Oct 3, 2016
View reviewed changes
Comment thread packages/logging/src/entry.js Outdated
*
* @param {object=|string=} resource - See a
* @param {object=} metadata - See a
* [Monitored Resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource).

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/logging/src/log.js Outdated
*
* @param {object=|string=} resource - See a
* @param {object=} metadata - See a
* [Monitored Resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource).

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zbjornson

zbjornson commented Oct 3, 2016

Copy link
Copy Markdown
Contributor

Don't have enough time to try it out at the moment, but the API and quick glance at the code look good. Thanks! Let me know if you want me to test before merging, but it looks straightforward enough.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus
stephenplusplus force-pushed the spp--1348 branch 2 times, most recently from 4a03638 to f880a9f Compare October 5, 2016 20:50
@callmehiphop

callmehiphop commented Oct 9, 2016

Copy link
Copy Markdown
Contributor

Can we add some system tests for this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

stephenplusplus added 4 commits October 10, 2016 09:15
@stephenplusplus
logging: change resource argument to metadata
b8f6225
@stephenplusplus
update metadata link
47203f2
@stephenplusplus
lint error
71941d2
@stephenplusplus
add system test
2e3f9b7
@stephenplusplus
stephenplusplus force-pushed the spp--1348 branch from f880a9f to 2e3f9b7 Compare October 10, 2016 13:35
@stephenplusplus

stephenplusplus commented Oct 10, 2016

Copy link
Copy Markdown
Contributor Author

Yes, good idea. Added!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coveralls

coveralls commented Oct 10, 2016

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 2e3f9b7 on stephenplusplus:spp--1348 into fc7ebb8 on GoogleCloudPlatform:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zbjornson zbjornson mentioned this pull request Oct 10, 2016
preparatory: update for breaking gcloud API change mlazarov/bunyan-stackdriver#6
Merged
@callmehiphop
callmehiphop merged commit dd5a482 into googleapis:master Oct 14, 2016
@zbjornson

zbjornson commented Oct 14, 2016

Copy link
Copy Markdown
Contributor

Thanks for the fix.

Do you know what version this will come out in -- 0.42.0 or 0.41.3? It's a breaking change and I need to update a dependency accordingly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus

stephenplusplus commented Oct 14, 2016

Copy link
Copy Markdown
Contributor Author

RE: the comment on mlazarov/bunyan-stackdriver#6, we do follow semver. It'll be 0.42.0, although we're backed up for a while (3-7 days) trying to get promises in. It'll also release independently in @google-cloud/[email protected].

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zbjornson

zbjornson commented Oct 14, 2016

Copy link
Copy Markdown
Contributor

Thanks.

we do follow semver

Er, right -- I guess because it's pre-1.0.0 breaking changes are allowed. :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus

stephenplusplus commented Oct 14, 2016

Copy link
Copy Markdown
Contributor Author

Pre-1.0, a minor bump signals a breaking change. npm install --save google-cloud saves the value ^0.41.0 in package.json, which is >=0.41.0 && < 0.42.0. Compared to if we were post 1.0, ^1.41.0 would mean >= 1.41.0 && < 2.0.0.

zbjornson and Tapppi reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus stephenplusplus mentioned this pull request Nov 22, 2016
Failure in npm/[email protected] #1806
Closed
@callmehiphop callmehiphop mentioned this pull request Mar 2, 2017
Documentation Fix : logging.log.entry metadata has wrong object format #1996
Closed
@mikolajroszak mikolajroszak mentioned this pull request May 7, 2024
[Snyk] Upgrade node-fetch from 2.7.0 to 3.3.2 mikolajroszak/google-cloud-node#7
Open
sofisl pushed a commit that referenced this pull request Feb 25, 2026
@ddelgrosso1
fix: do not use src precondition options in copy. (#1666)
a511a01
* fix: do not use src precondition options in copy.

* add new line
sofisl pushed a commit that referenced this pull request Feb 25, 2026
@release-please
chore: release 5.15.3 (#1667)
6443118
🤖 I have created a release \*beep\* \*boop\*
---
### [5.15.3](https://www.github.com/googleapis/nodejs-storage/compare/v5.15.2...v5.15.3) (2021-10-14)


### Bug Fixes

* do not use src precondition options in copy. ([#1666](https://www.github.com/googleapis/nodejs-storage/issues/1666)) ([678ae77](https://www.github.com/googleapis/nodejs-storage/commit/678ae77dfb2c1eb2272734f34315b4d0ec726076))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
GautamSharda pushed a commit that referenced this pull request Mar 5, 2026
@stephenplusplus @callmehiphop
logging: change resource argument to metadata (#1666)
8a58b32
@GautamSharda GautamSharda mentioned this pull request Mar 5, 2026
migrate code from googleapis/nodejs-logging #7514
Merged
4 tasks
@meltsufin meltsufin mentioned this pull request Mar 10, 2026
chore: migrate code from googleapis/nodejs-logging #7550
Merged
GautamSharda pushed a commit that referenced this pull request Mar 11, 2026
@feywind @gcf-owl-bot
samples: add more TS samples (#1666)
95fc7ee
* samples: work in progress on sample conversion to TS

* chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport (#1663)

* chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport

chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java)
PiperOrigin-RevId: 493113566

Source-Link: googleapis/googleapis@758f0d1

Source-Link: googleapis/googleapis-gen@78bd8f0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Megan Potter <[email protected]>

* build: use typeless bot 1.2.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* build: also run fix before README generation

* samples: add missing validateSchema.ts, and fix copyright dates in setTopicPolicy

* build: use hermetic version of gts for owlbot

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* samples: update copyright

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* samples: manually update validateSchema since it's not technically sample snippet

* chore: update typeless bot version

* chore: linting updates

* samples: update module export method for resumePublish.ts

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
thiyaguk09 pushed a commit to thiyaguk09/google-cloud-node-fork that referenced this pull request Mar 18, 2026
@ddelgrosso1
fix: do not use src precondition options in copy. (googleapis#1666)
149c30f
* fix: do not use src precondition options in copy.

* add new line
thiyaguk09 pushed a commit to thiyaguk09/google-cloud-node-fork that referenced this pull request Mar 18, 2026
@release-please
chore: release 5.15.3 (googleapis#1667)
db5fc4a
🤖 I have created a release \*beep\* \*boop\*
---
### [5.15.3](https://www.github.com/googleapis/nodejs-storage/compare/v5.15.2...v5.15.3) (2021-10-14)


### Bug Fixes

* do not use src precondition options in copy. ([googleapis#1666](https://www.github.com/googleapis/nodejs-storage/issues/1666)) ([149c30f](https://www.github.com/googleapis/nodejs-storage/commit/149c30ffe939d7068e17e3535075e1f8f350efa5))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
feywind added a commit that referenced this pull request Mar 27, 2026
@feywind @gcf-owl-bot
samples: add more TS samples (#1666)
8766ec3
* samples: work in progress on sample conversion to TS

* chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport (#1663)

* chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport

chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java)
PiperOrigin-RevId: 493113566

Source-Link: googleapis/googleapis@758f0d1

Source-Link: googleapis/googleapis-gen@78bd8f0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Megan Potter <[email protected]>

* build: use typeless bot 1.2.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* build: also run fix before README generation

* samples: add missing validateSchema.ts, and fix copyright dates in setTopicPolicy

* build: use hermetic version of gts for owlbot

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* samples: update copyright

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* samples: manually update validateSchema since it's not technically sample snippet

* chore: update typeless bot version

* chore: linting updates

* samples: update module export method for resumePublish.ts

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@zbjornson zbjornson zbjornson left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: logging Issues related to the Cloud Logging API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@stephenplusplus @zbjornson @callmehiphop @coveralls @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.