File tree Expand file tree Collapse file tree 9 files changed +25
-32
lines changed
opentelemetry-exporter-gcp-logging
src/opentelemetry/exporter/cloud_logging
opentelemetry-exporter-gcp-monitoring/src/opentelemetry/exporter/cloud_monitoring
opentelemetry-exporter-gcp-trace/src/opentelemetry/exporter/cloud_trace
opentelemetry-propagator-gcp/src/opentelemetry/propagators/cloud_trace_propagator
opentelemetry-resourcedetector-gcp/src/opentelemetry/resourcedetector/gcp_resource_detector Expand file tree Collapse file tree 9 files changed +25
-32
lines changed Original file line number Diff line number Diff line change 8989** pointing at the first commit (a)** that was merged into main. For the
9090example PR listed above, that creates release
9191[ ` v0.11b0@4ad9ccd ` ] ( https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/releases/tag/v0.11b0 ) .
92- - In description, paste a changelog for the packages. I used this (probably
93- buggy) small script for the example PR's tag:
94-
95- ``` bash
96- for cl in opentelemetry-* /CHANGELOG.md; do
97- if cl_entries=` pcregrep -M -o1 " ^## Version 0\.10b0$\n\n^Released.*\n\n((?:- [\s\S]+?)*?)(?=(\s+##|\Z))" $cl `
98- then
99- echo -e " # ` dirname $cl ` \n$cl_entries "
100- fi
101- done
102- ```
92+
93+ Click the "Generate release notes" button in the UI to get an autogenerated changelog for the packages.
10394
10495Once the release tag is created, move the ` stable ` tag to point to the same
10596commit.
Original file line number Diff line number Diff line change 3535-----
3636
3737.. code :: python
38+
3839 import logging
3940 from opentelemetry.exporter.cloud_logging import (
4041 CloudLoggingExporter,
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- __version__ = "1.9.0a0 "
15+ __version__ = "1.10.0.dev0 "
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- __version__ = "1.9.0a0 "
15+ __version__ = "1.10.0.dev0 "
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- __version__ = "1.9.0 "
15+ __version__ = "1.10.0.dev0 "
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- __version__ = "1.9.0 "
15+ __version__ = "1.10.0.dev0 "
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- __version__ = "1.9.0a0 "
15+ __version__ = "1.10.0.dev0 "
Original file line number Diff line number Diff line change 3232This is a sample script that exports OTLP traces encoded as protobufs via gRPC.
3333"""
3434
35- credentials , project_id = google .auth .default ()
35+ credentials , _ = google .auth .default ()
3636request = google .auth .transport .requests .Request ()
3737resource = Resource .create (attributes = {SERVICE_NAME : "otlp-gcp-grpc-sample" })
3838
39- auth_metadata_plugin = AuthMetadataPlugin (
40- credentials = credentials , request = request
41- )
39+ auth_metadata_plugin = AuthMetadataPlugin (credentials = credentials , request = request )
4240channel_creds = grpc .composite_channel_credentials (
4341 grpc .ssl_channel_credentials (),
4442 grpc .metadata_call_credentials (auth_metadata_plugin ),
4543)
4644
4745trace_provider = TracerProvider (resource = resource )
48- processor = BatchSpanProcessor (OTLPSpanExporter (credentials = channel_creds ))
46+ processor = BatchSpanProcessor (
47+ OTLPSpanExporter (
48+ credentials = channel_creds ,
49+ )
50+ )
4951trace_provider .add_span_processor (processor )
5052trace .set_tracer_provider (trace_provider )
5153tracer = trace .get_tracer ("my.tracer.name" )
Original file line number Diff line number Diff line change 1919from opentelemetry .exporter .otlp .proto .http .trace_exporter import (
2020 OTLPSpanExporter ,
2121)
22+ from google .auth .transport .requests import AuthorizedSession
2223from opentelemetry .sdk .resources import SERVICE_NAME , Resource
2324from opentelemetry .sdk .trace import TracerProvider
2425from opentelemetry .sdk .trace .export import BatchSpanProcessor
2526
26- credentials , project_id = google .auth .default ()
27- request = google .auth .transport .requests .Request ()
28- credentials .refresh (request )
29- req_headers = {
30- "x-goog-user-project" : credentials .quota_project_id ,
31- "Authorization" : "Bearer " + credentials .token ,
32- }
33- resource = Resource .create (attributes = {SERVICE_NAME : "otlp-gcp-http-sample" })
34-
35- trace_provider = TracerProvider (resource = resource )
36- processor = BatchSpanProcessor (OTLPSpanExporter (headers = req_headers ))
27+ credentials , _ = google .auth .default ()
28+ trace_provider = TracerProvider (
29+ resource = Resource .create (attributes = {SERVICE_NAME : "otlp-gcp-http-sample" })
30+ )
31+ processor = BatchSpanProcessor (
32+ OTLPSpanExporter (
33+ session = AuthorizedSession (credentials ),
34+ )
35+ )
3736trace_provider .add_span_processor (processor )
3837trace .set_tracer_provider (trace_provider )
3938tracer = trace .get_tracer ("my.tracer.name" )
You can’t perform that action at this time.
0 commit comments