diff --git a/eng/versioning/update_versions.py b/eng/versioning/update_versions.py index 1b08e5789c8b..15a6669b91e4 100644 --- a/eng/versioning/update_versions.py +++ b/eng/versioning/update_versions.py @@ -23,7 +23,7 @@ # necessary here, since our README.md files don't contain externaly dependency versions, there's no point in scanning files # that shouldn't require changes. # python eng/versioning/update_versions.py --ut external_dependency --sr -# +# # The script must be run at the root of azure-sdk-for-java. import argparse @@ -54,16 +54,16 @@ def update_versions(version_map, target_file): if match: module_name, version_type = match.group(1), match.group(2) repl_thisline = True - else: - match = version_update_start_marker.search(line) - if match: - module_name, version_type = match.group(1), match.group(2) - repl_open, repl_thisline = True, True - else: - match = version_update_end_marker.search(line) - if match: + else: + match = version_update_start_marker.search(line) + if match: + module_name, version_type = match.group(1), match.group(2) + repl_open, repl_thisline = True, True + else: + match = version_update_end_marker.search(line) + if match: repl_open, repl_thisline = False, False - + if repl_thisline: # If the module isn't found then just continue. This can # happen if we're going through and replacing only library @@ -121,7 +121,7 @@ def load_version_map_from_file(the_file, version_map): def display_version_info(version_map): for value in version_map.values(): print(value) - + def update_versions_all(update_type, build_type, target_file, skip_readme): version_map = {} # Load the version and/or external dependency file for the given UpdateType @@ -145,10 +145,10 @@ def update_versions_all(update_type, build_type, target_file, skip_readme): for root, _, files in os.walk("."): for file_name in files: file_path = root + os.sep + file_name - if (file_name == 'README.md' and not skip_readme) or (file_name.startswith('pom.') and file_name.endswith('.xml')): + if (file_name.endswith('.md') and not skip_readme) or (file_name.startswith('pom.') and file_name.endswith('.xml')): update_versions(version_map, file_path) - # This is a temporary stop gap to deal with versions hard coded in java files. + # This is a temporary stop gap to deal with versions hard coded in java files. # Everything within the begin/end tags below can be deleted once # https://github.com/Azure/azure-sdk-for-java/issues/3141 has been fixed. # version_*_java_files.txt @@ -184,4 +184,4 @@ def main(): print('Total time for replacement: {}'.format(str(timedelta(seconds=elapsed_time)))) if __name__ == '__main__': - main() \ No newline at end of file + main() diff --git a/sdk/core/azure-core-tracing-opencensus/README.md b/sdk/core/azure-core-tracing-opencensus/README.md index acfa6391af93..00a7c834c67e 100644 --- a/sdk/core/azure-core-tracing-opencensus/README.md +++ b/sdk/core/azure-core-tracing-opencensus/README.md @@ -19,58 +19,11 @@ documentation][api_documentation] | [Samples][samples] com.azure azure-core-tracing-opencensus - 1.0.0-beta.5 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) -### Default HTTP Client -All client libraries, by default, use Netty HTTP client. Adding the above dependency will automatically configure -Tracing OpenCensus to use Netty HTTP client. - -### Alternate HTTP Client -If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Exclude the default -Netty and include OkHTTP client in your pom.xml. - -[//]: # ({x-version-update-start;com.azure:azure-core-tracing-opencensus;current}) -```xml - - - com.azure - azure-core-tracing-opencensus - 1.0.0-beta.5 - - - com.azure - azure-core-http-netty - - - -``` -[//]: # ({x-version-update-end}) -[//]: # ({x-version-update-start;com.azure:azure-core-http-okhttp;current}) -```xml - - - com.azure - azure-core-http-okhttp - 1.0.0 - -``` -[//]: # ({x-version-update-end}) - -### Configuring HTTP Clients -When an HTTP client is included on the classpath, as shown above, it is not necessary to specify it in the client library [builders][create-eventhubs-builders], unless you want to customize the HTTP client in some fashion. If this is desired, the `httpClient` builder method is often available to achieve just this, by allowing users to provide a custom (or customized) `com.azure.core.http.HttpClient` instances. - -For starters, by having the Netty or OkHTTP dependencies on your classpath, as shown above, you can create new instances of these `HttpClient` types using their builder APIs. For example, here is how you would create a Netty HttpClient instance: - -```java -HttpClient client = new NettyAsyncHttpClientBuilder() - .port(8080) - .wiretap(true) - .build(); -``` - ## Key concepts ### Trace A trace is a tree of spans showing the path of work through a system. A trace on its own is distinguishable by a unique 16 byte sequence called a TraceID. diff --git a/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncListKeyVaultSecrets.md b/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncListKeyVaultSecrets.md index 4fa008479e2e..1e29612b229d 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncListKeyVaultSecrets.md +++ b/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncListKeyVaultSecrets.md @@ -12,7 +12,7 @@ Sample uses **[opencensus-impl][opencensus_impl]** as implementation package and com.azure azure-security-keyvault-secrets - 4.0.1 + 4.0.1 ``` [//]: # ({x-version-update-end}) @@ -22,7 +22,7 @@ Sample uses **[opencensus-impl][opencensus_impl]** as implementation package and com.azure azure-core-tracing-opencensus - 1.0.0-beta.5 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncQueueClientEnqueueMessages.md b/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncQueueClientEnqueueMessages.md index 285fe7d43904..27e2066b6f39 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncQueueClientEnqueueMessages.md +++ b/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncQueueClientEnqueueMessages.md @@ -7,13 +7,14 @@ messages on queue client with tracing instrumentation. Sample uses **[opencensus-impl][opencensus_impl]** as implementation package and **[Zipkin Exporter][zipkin_exporter]** as exporter. ### Adding dependencies to your project: + [//]: # ({x-version-update-start;com.azure:azure-storage-queue;current}) ```xml com.azure azure-storage-queue - 12.1.0 + 12.1.0 ``` [//]: # ({x-version-update-end}) @@ -23,13 +24,13 @@ Sample uses **[opencensus-impl][opencensus_impl]** as implementation package and com.azure azure-core-tracing-opencensus - 1.0.0-beta.5 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) + ```xml - io.opencensus opencensus-exporter-trace-zipkin @@ -41,6 +42,8 @@ Sample uses **[opencensus-impl][opencensus_impl]** as implementation package and 0.24.0 ``` +> All client libraries, by default, use Netty HTTP client. For adding client library dependency without netty, please follow the documentation [here][alternate_http_client]. + #### Sample demonstrates tracing when asynchronously queueing and dequeuing of messages using [azure-storage-queue][azure_storage_queue] client library. ```java import com.azure.core.util.Context; @@ -118,6 +121,7 @@ public class Sample { ``` +[alternate_http_client]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/storage/azure-storage-queue#alternate-http-client [azure_storage_queue]: https://mvnrepository.com/artifact/com.azure/azure-storage-queue [opencensus_impl]: https://mvnrepository.com/artifact/io.opencensus/opencensus-impl/ [zipkin_exporter]: https://mvnrepository.com/artifact/io.opencensus/opencensus-exporter-trace-zipkin diff --git a/sdk/core/azure-core-tracing-opencensus/src/samples/ListeKeyVaultSecrets.md b/sdk/core/azure-core-tracing-opencensus/src/samples/ListeKeyVaultSecrets.md index a9dd0a106861..4ed8864983f8 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/samples/ListeKeyVaultSecrets.md +++ b/sdk/core/azure-core-tracing-opencensus/src/samples/ListeKeyVaultSecrets.md @@ -6,13 +6,14 @@ Following documentation describes instructions to run a sample program for creat Sample uses **[opencensus-impl][opencensus_impl]** as implementation package and **[ZipkinExporter][zipkin_exporter]** as exporter. ### Adding dependencies to your project: + [//]: # ({x-version-update-start;com.azure:azure-security-keyvault-secrets;current}) ```xml com.azure azure-security-keyvault-secrets - 4.0.1 + 4.0.1 ``` [//]: # ({x-version-update-end}) @@ -22,10 +23,11 @@ Sample uses **[opencensus-impl][opencensus_impl]** as implementation package and com.azure azure-core-tracing-opencensus - 1.0.0-beta.5 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) + ```xml diff --git a/sdk/core/azure-core-tracing-opencensus/src/samples/PublishEvents.md b/sdk/core/azure-core-tracing-opencensus/src/samples/PublishEvents.md index 61f73847b05d..29674153f9b8 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/samples/PublishEvents.md +++ b/sdk/core/azure-core-tracing-opencensus/src/samples/PublishEvents.md @@ -7,22 +7,24 @@ Following documentation describes instructions to run a sample program for publi Sample uses **[opencensus-impl][opencensus_impl]** as implementation package and **[Zipkin Exporter][zipkin_exporter]** as exporter. ### Adding dependencies to your project: + [//]: # ({x-version-update-start;com.azure:azure-messaging-eventhubs;current}) ```xml com.azure azure-messaging-eventhubs - 5.0.0-beta.6 + 5.0.0-beta.6 ``` [//]: # ({x-version-update-end}) +[//]: # ({x-version-update-start;com.azure:azure-core-tracing-opencensus;current}) ```xml com.azure azure-core-tracing-opencensus - 1.0.0-beta.5 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-tracing-opencensus/src/samples/QueueClientEnqueueMessages.md b/sdk/core/azure-core-tracing-opencensus/src/samples/QueueClientEnqueueMessages.md index 5651e6decc5d..8ce90a2ff790 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/samples/QueueClientEnqueueMessages.md +++ b/sdk/core/azure-core-tracing-opencensus/src/samples/QueueClientEnqueueMessages.md @@ -7,13 +7,14 @@ messages on queue client with tracing instrumentation. Sample uses **[opencensus-impl][opencensus_impl]** as implementation package and **[Zipkin Exporter][zipkin_exporter]** as exporter. ### Adding dependencies to your project: + [//]: # ({x-version-update-start;com.azure:azure-storage-queue;current}) ```xml com.azure azure-storage-queue - 12.1.0 + 12.1.0 ``` [//]: # ({x-version-update-end}) @@ -23,10 +24,11 @@ Sample uses **[opencensus-impl][opencensus_impl]** as implementation package and com.azure azure-core-tracing-opencensus - 1.0.0-beta.5 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) + ```xml diff --git a/sdk/core/azure-core-tracing-opentelemetry/README.md b/sdk/core/azure-core-tracing-opentelemetry/README.md index 4cc6f4cfc4c7..772a8b26ac5a 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/README.md +++ b/sdk/core/azure-core-tracing-opentelemetry/README.md @@ -13,63 +13,17 @@ documentation][api_documentation] | [Samples][samples] - [Maven][maven] ### Adding package to your product -[//]: # ({x-version-update-start;com.azure:azure-core-tracing-opentelemetry;current}) -```xml - - com.azure - azure-core-tracing-opentelemetry - 1.0.0-beta.1 - -``` -[//]: # ({x-version-update-end}) - -### Default HTTP Client -All client libraries, by default, use Netty HTTP client. Adding the above dependency will automatically configure -Tracing OpenTelemetry to use Netty HTTP client. - -### Alternate HTTP Client -If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Exclude the default -Netty and include OkHTTP client in your pom.xml. [//]: # ({x-version-update-start;com.azure:azure-core-tracing-opentelemetry;current}) ```xml - - - com.azure - azure-core-tracing-opentelemetry - 1.0.0-beta.1 - - - com.azure - azure-core-http-netty - - - -``` -[//]: # ({x-version-update-end}) -[//]: # ({x-version-update-start;com.azure:azure-core-http-okhttp;current}) -```xml - com.azure - azure-core-http-okhttp - 1.0.0 + azure-core-tracing-opentelemetry + 1.0.0-beta.1 ``` [//]: # ({x-version-update-end}) -### Configuring HTTP Clients -When an HTTP client is included on the classpath, as shown above, it is not necessary to specify it in the client library [builders][create-eventhubs-builders], unless you want to customize the HTTP client in some fashion. If this is desired, the `httpClient` builder method is often available to achieve just this, by allowing users to provide a custom (or customized) `com.azure.core.http.HttpClient` instances. - -For starters, by having the Netty or OkHTTP dependencies on your classpath, as shown above, you can create new instances of these `HttpClient` types using their builder APIs. For example, here is how you would create a Netty HttpClient instance: - -```java -HttpClient client = new NettyAsyncHttpClientBuilder() - .port(8080) - .wiretap(true) - .build(); -``` - ## Key concepts ### Trace A trace is a tree of spans showing the path of work through a system. A trace on its own is distinguishable by a unique 16 byte sequence called a TraceID. @@ -180,7 +134,7 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. -[api_documentation]: https://azure.github.io/azure-sdk-for-java/track2reports/index.html +[api_documentation]: https://azure.github.io/azure-sdk-for-java/ [azure_data_app_configuration]: https://mvnrepository.com/artifact/com.azure/azure-data-appconfiguration/ [azure-security-keyvault-secrets]: ../../keyvault/azure-security-keyvault-secrets [azure_keyvault_secrets]: https://mvnrepository.com/artifact/com.azure/azure-security-keyvault-secrets diff --git a/sdk/core/azure-core-tracing-opentelemetry/src/samples/AsyncListKeyVaultSecretsSample.md b/sdk/core/azure-core-tracing-opentelemetry/src/samples/AsyncListKeyVaultSecretsSample.md index 2a193f24b3f7..8363154334c7 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/src/samples/AsyncListKeyVaultSecretsSample.md +++ b/sdk/core/azure-core-tracing-opentelemetry/src/samples/AsyncListKeyVaultSecretsSample.md @@ -6,30 +6,37 @@ Following documentation describes instructions to run a sample program for async Sample uses **[opentelemetry-sdk][opentelemetry_sdk]** as implementation package and **[Logging Exporter][logging_exporter]** as exporter. ### Adding dependencies to your project: ```xml - - - io.opentelemetry - opentelemetry-sdk - 0.2.0 - - - com.azure - azure-security-keyvault-secrets - 4.0.1 - - - com.azure - azure-core-tracing-opentelemetry - 1.0.0-beta.1 - - - io.opentelemetry - opentelemetry-exporters-logging - 0.2.0 - - + + io.opentelemetry + opentelemetry-sdk + 0.2.0 + + + io.opentelemetry + opentelemetry-exporters-logging + 0.2.0 + ``` +[//]: # ({x-version-update-start;com.azure:azure-security-keyvault-secrets;current}) +```xml + + com.azure + azure-security-keyvault-secrets + 4.0.1 + +``` +[//]: # ({x-version-update-end}) +[//]: # ({x-version-update-start;com.azure:azure-core-tracing-opentelemetry;current}) +```xml + + com.azure + azure-core-tracing-opentelemetry + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + #### Sample demonstrates tracing when asynchronously creating and listing secrets from a Key Vault using [azure-security-keyvault-secrets][azure_keyvault_secrets] client library. ```java import com.azure.identity.DefaultAzureCredentialBuilder; diff --git a/sdk/core/azure-core-tracing-opentelemetry/src/samples/CreateConfigurationSettingTracingSample.md b/sdk/core/azure-core-tracing-opentelemetry/src/samples/CreateConfigurationSettingTracingSample.md index b13c710ceff6..76df142d273d 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/src/samples/CreateConfigurationSettingTracingSample.md +++ b/sdk/core/azure-core-tracing-opentelemetry/src/samples/CreateConfigurationSettingTracingSample.md @@ -6,30 +6,37 @@ Following documentation describes instructions to run a sample program for creat Sample uses **[opentelemetry-sdk][opentelemetry_sdk]** as implementation package and **[Logging Exporter][logging_exporter]** as exporter. ### Adding dependencies to your project: ```xml - - - io.opentelemetry - opentelemetry-sdk - 0.2.0 - - - com.azure - azure-data-appconfiguration - 1.0.0-beta.7 - - - com.azure - azure-core-tracing-opentelemetry - 1.0.0-beta.1 - - - io.opentelemetry - opentelemetry-exporters-logging - 0.2.0 - - + + io.opentelemetry + opentelemetry-sdk + 0.2.0 + + + io.opentelemetry + opentelemetry-exporters-logging + 0.2.0 + +``` +[//]: # ({x-version-update-start;com.azure:azure-data-appconfiguration;current}) +```xml + + com.azure + azure-data-appconfiguration + 1.0.0-beta.7 + ``` +[//]: # ({x-version-update-end}) +[//]: # ({x-version-update-start;com.azure:azure-core-tracing-opentelemetry;current}) +```xml + + com.azure + azure-core-tracing-opentelemetry + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + #### Sample demonstrates tracing when adding a configuration setting using [azure-data-app-configuration][azure_data_app_configuration] client library. ```java import com.azure.core.util.Context; diff --git a/sdk/core/azure-core-tracing-opentelemetry/src/samples/ListKeyVaultSecretsTracingSample.md b/sdk/core/azure-core-tracing-opentelemetry/src/samples/ListKeyVaultSecretsTracingSample.md index 96bc8f8d67de..289faf51bc67 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/src/samples/ListKeyVaultSecretsTracingSample.md +++ b/sdk/core/azure-core-tracing-opentelemetry/src/samples/ListKeyVaultSecretsTracingSample.md @@ -6,30 +6,37 @@ Following documentation describes instructions to run a sample program for creat Sample uses **[opentelemetry-sdk][opentelemetry_sdk]** as implementation package and **[Logging Exporter][logging_exporter]** as exporter. ### Adding dependencies to your project: ```xml - - - io.opentelemetry - opentelemetry-sdk - 0.2.0 - - - com.azure - azure-security-keyvault-secrets - 4.0.1 - - - com.azure - azure-core-tracing-opentelemetry - 1.0.0-beta.1 - - - io.opentelemetry - opentelemetry-exporters-logging - 0.2.0 - - + + io.opentelemetry + opentelemetry-sdk + 0.2.0 + + + io.opentelemetry + opentelemetry-exporters-logging + 0.2.0 + ``` +[//]: # ({x-version-update-start;com.azure:azure-security-keyvault-secrets;current}) +```xml + + com.azure + azure-security-keyvault-secrets + 4.0.1 + +``` +[//]: # ({x-version-update-end}) +[//]: # ({x-version-update-start;com.azure:azure-core-tracing-opentelemetry;current}) +```xml + + com.azure + azure-core-tracing-opentelemetry + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + #### Sample demonstrates tracing when creating and listing secrets from a Key Vault using [azure-security-keyvault-secrets][azure_keyvault_secrets] client library. ```java import com.azure.core.util.Context; diff --git a/sdk/core/azure-core-tracing-opentelemetry/src/samples/PublishEventsTracingSample.md b/sdk/core/azure-core-tracing-opentelemetry/src/samples/PublishEventsTracingSample.md index 91ed0e1bc79a..2bd9d1bd6ab7 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/src/samples/PublishEventsTracingSample.md +++ b/sdk/core/azure-core-tracing-opentelemetry/src/samples/PublishEventsTracingSample.md @@ -6,30 +6,37 @@ Following documentation describes instructions to run a sample program for publi Sample uses **[opentelemetry-sdk][opentelemetry_sdk]** for implementation and **[Logging Exporter][logging_exporter]** as exporter. ### Adding dependencies to your project: ```xml - - - io.opentelemetry - opentelemetry-sdk - 0.2.0 - - - com.azure - azure-messaging-eventhubs - 5.0.0-beta.6 - - - com.azure - azure-core-tracing-opentelemetry - 1.0.0-beta.1 - - - io.opentelemetry - opentelemetry-exporters-logging - 0.2.0 - - + + io.opentelemetry + opentelemetry-sdk + 0.2.0 + + + io.opentelemetry + opentelemetry-exporters-logging + 0.2.0 + +``` +[//]: # ({x-version-update-start;com.azure:azure-messaging-eventhubs;current}) +```xml + + com.azure + azure-messaging-eventhubs + 5.0.0-beta.6 + ``` +[//]: # ({x-version-update-end}) +[//]: # ({x-version-update-start;com.azure:azure-core-tracing-opentelemetry;current}) +```xml + + com.azure + azure-core-tracing-opentelemetry + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + #### Sample demonstrates tracing when publishing multiple events to an eventhub instance using [azure-messaging-eventhubs][azure_messaging_eventhubs] client library. ```java import com.azure.core.util.Context;